hello everyone,
i started learning
java last night. i had a previous little knowledge with c++, somewhere in the past.
i am doing an exercise where i load a black picture, change its RGB values and then i could see the hidden image. i have read much about filechooser and so...and finally i made it to get a little window asking me to choose a file.
now my ideas are too "loose" yet, and i am confused and dont know what to do.
I have seen many examples that do what i want.
It seems the right way is to count every pixel of the .png file? and using something similar to getRed, getBlue, getGreen for every
i (means width) and
j (height)?
so the idea is, e.g i have a 4x4 image, i.e 16 pixels (?) then i would use the getRed getBlue getGreen stuff to grab the RGB of each pixel? That means 16 data values?
so i would edit these 16 values, like *0,5 if i want to decrease the RGB level and so?
i cant understand how my code would ordenate all the pixels again at the end...
isnt there a way to get a data like "this is the RGB value of the image" instead of "those are the RGB values of every pixel"?
sorry if this is a too abstract question, but i dont know how to express my problem, as i said, i am rather confused.
and i apologize i dont have a code to post, but this part of the code i dont have yet. All the other parts are: creating object for the picture, loading a picture, showing a picture
[here i should add the code to edit the RGB values] and then save this new picture somewhere. and i dont think they would help in this part...