aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to create image from array of pixels? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to create image from array of pixels?" Watch "How to create image from array of pixels?" New topic
Author

How to create image from array of pixels?

Rohit Kumar
Ranch Hand

Joined: Sep 20, 2007
Posts: 53
How to create image from array of pixels?

We can get pixels of an image from PixelGrabber.
Is there any API which does reverse?
Create an image from array of pixels?
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Originally posted by Rohit Kumar:
How to create image from array of pixels?

We can get pixels of an image from PixelGrabber.
Is there any API which does reverse?
Create an image from array of pixels?


Well there's MemoryImageSource and the other implementations of ImageProducer, but they may be overkill depending on what you're trying to do.


bitguru blog
Rohit Kumar
Ranch Hand

Joined: Sep 20, 2007
Posts: 53
Well i am creating array of pixels from image.
Now i want to create image back from that array of pixels.
I want to remove few pixels from it, so i can reduce the size of the image.

Actually i want to reduce either the size (disk size) of image or resolution (height and width) of image.

I used different ways to do it like compressionQuality etc.
But with different apis i foudn that when i just read image and save back the "disk size" of the resultant image is very less than source image.

any help on,
1) creating image from array of pixels (the resultant image shoud look same like original)

2) creating new image from an image with same disk size.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create image from array of pixels?