If you have an int array representing individual pixels' RGB and Alpha values, how can I turn this into an image? Thanks in advance.
Asked
Active
Viewed 2,116 times
1 Answers
1
You might want to use BufferedImage
and setRGB
method, see the docs and look for following method:
public void setRGB(int startX,
int startY,
int w,
int h,
int[] rgbArray,
int offset,
int scansize)

Xorty
- 18,367
- 27
- 104
- 155
-
See also [this answer](http://stackoverflow.com/questions/124630/turn-an-array-of-pixels-into-an-image-object-with-javas-imageio/125013#125013). – Mechanical snail Aug 09 '11 at 17:57