• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to create image from array of pixels?

 
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?
 
Author
Posts: 974
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.
    Bookmark Topic Watch Topic
  • New Topic