Saving Images



Sorry for a newbie question: Is it possible to create a picture (create graphics, add triangles etc.) and then save it as a .png-file?
Thanks for your help.



try this

[code] Image myImage (Image::RGB, 500, 500, true);
Graphics g (myImage);
g.setColour (Colours::red);
g.fillEllipse (20, 20, 300, 200);

FileOutputStream stream (File ("c:\test.png"));
PNGImageFormat pngWriter;
pngWriter.writeImageToStream(myImage, stream);[/code]