What values go in the data array? Look at the code in the following method. It shows how the 4 bytes in an int are converted to the 4 values for each pixel:
public static String...
Type: Posts; User: Norm
What values go in the data array? Look at the code in the following method. It shows how the 4 bytes in an int are converted to the 4 values for each pixel:
public static String...
Your code creates the file, so you know what each number is. You need to undo the steps used to create the file to retrieve the RGB value to use with the set method.
Have you tried it?
Is there a method in the same class that getRGB() is in?
If width = height then the sqrt of the length of the file (div by number of bytes per pixel) would give the width and height.
Every pixel's value is in the next 12+ bytes. Read the bytes, convert...
How do you know the width and height of the image you want to create from the file of pixel data?
What is to be written to the text file? A text file normally has Strings, not binary.
Would each of the 4 pixel values be a String of 3 numeric digits? With possible values being:
"000" to "255"?...