Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create image from array of pixels?

 
Rohit Kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 908
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rohit Kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic