I have not been into image processing.
I want to read a .jpeg image file in JAVA and draw pixels on the canvas based on the color values.
i.e. draw all black pixels first, then draw all grey pixels, and so on.....and white pixels at the end.
I also want to introduce a very small gap between each pixel drawn so that I can see how the image is being drawn.
Any help would be appreciated.
解决方案
Here is a short, stripped down, instruction example that will get you started. This code breaks down the RGB values from the image. You then do whatever you need do with the data.
public static BufferedImage exampleForSO(BufferedImage image) {
BufferedImage imageIn = image;
BufferedImage imageOut =
new BufferedImage(imageIn.getWidth(), imageIn.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
int width = imag