I am working on a Survial game in java,and am working on map gen.
Im looking for a way to Make a Image of the maps.
I have a ArrayList of all the blocks,and would like to make it so if the block at 0,0 on the map if for example grass,I can set the pixel at 0,0 on this image to be green,and so on for the other blocks.
EDIT —-
as people are saying its unclear what Im trying to ask,this is the sort of image im talking about:

Where the dark green is the grass,the light green is trees,yellow is sand and blue is water.
Above is an example snapshot from something i had used. Its just a prototype so needs refining. Basically you can build a buffered image in memory and write to file or put that image in another component such as jlabel.
Once you have graphics reference you can pretty much use it as Canvas.