Saving as JPEG

I’ve made a small App, that generates a Mandelbrot-Set in an immage-object.
Now I’d like to store the image as an JPEG-file on the harddisk.
But I don’t know how to do it.
Could someone describe (just breifly) the steps how to do it?

Thanks for your help!
Cheers LukeS

from memory, it’s something like:

File f("c:\\myimage.jpg");
FileOutputStream fo(f);
JPEGImageFormat jpeg();

jpeg.writeImageToStream(fo, myImage);

Look at the documentation for FileOutputStream, and JPEGImageFileFormat.

Thanks I’ll try it out.
I had a look at the documentation. But it wasn’t clear to me.

Thanks a lot!