juce_saveJpegImageToFile

Ok, well I’ve got a working jpeg writer now. Might have a go at pngs.

And I remembered why I hacked out all the error handling - the damn thing just quits the app if anything goes wrong!

and bmps… :wink:

Valley: I’ve been needing to print an image from juce to a printer. No native printing support yet in juce, but I found a nice function in windows that allows me to pass a filename which will print an image, as bitmap, jpeg, gif, or png. Don’t need it quite yet, do however need it operational by friday if possible. In the mean time, that code at the top I may borrow until the next juce comes out.

No need to rush, do it right and do it well, I’ll use my hacks in the interim. :slight_smile:

I havn’t looked at the image code, why does it quit, does it make heavy usage of longjumps or? If that is the case, should be able to just override the handler for it as that is how most of those are done; or even just find a C++ exception wrapper for it?

Yes, got a silent error handler in there now, done properly this time, not a hack like I did before!

PNGs are working too now, so will post a new version with this support in the next few days.

Looking forward to it.

nice one jules!
i’m waiting to an ImageFormat class that handles the image writing subclassing…