How to adjust JPG quality using Image::write() in Magic++

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Bob-O-Rama
Posts: 31
Joined: 2007-11-23T15:34:51-07:00

How to adjust JPG quality using Image::write() in Magic++

Post by Bob-O-Rama »

I've obviously missed the memo...
How do you select the compression quality when writing out to JPG when using the Magick++ APIs?

I've noticed that all of the JPGs I'm writing out are using 18:1 compression. No wonder I have more artifacts than the British Museum.

Thanks!

-- Bob
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to adjust JPG quality using Image::write() in Magic++

Post by magick »

Use quality() to set the image compression (e.g. image.quality(92)).
Bob-O-Rama
Posts: 31
Joined: 2007-11-23T15:34:51-07:00

Re: How to adjust JPG quality using Image::write() in Magic++

Post by Bob-O-Rama »

That's simply too easy... can you make it really difficult and perplexing? Perhaps requiring several hundred lines of assembler code? :-) I was looking over the Magick++ documentation for a while and must have totally spaced out.

Thanks!!!
Post Reply