Drawing to image.

Hello,

My question is how can I in java create a image and then save it?
Like pixel 100 = 0xFF665522 and then save it to png?

Thanks joaogl