Page 1 of 1

writing files with Magick++

Posted: 2016-07-28T13:04:45-07:00
by stephanecharette
When writing files with Magick::Image::write(), how are options set? For example, if I have the following:

Code: Select all

Magick::Image img;
// do something here to populate img
img.write( "test.jpg" );
Is there a way to specify the quality of the JPG file? Or if it should be progressive? Or a comment to store in the JPG?

What if the write was to "test.png": Is there a way to specify the compression level? Adam7 interlacing? Timestamp? Comment?

I'm assuming that write() gets the file format to use from the filename, because I don't see a parameter in write() to indicate the file format to use. But obviously I'm missing part of the API because I'm certain there must be a way to specify parameters to use when saving images.

Re: writing files with Magick++

Posted: 2016-07-28T13:24:54-07:00
by snibgo