How do I manage a compression settings

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wizard29
Posts: 58
Joined: 2014-03-21T00:40:16-07:00
Authentication code: 6789
Location: Russia, Saint Petersburg
Contact:

How do I manage a compression settings

Post by wizard29 »

Hi, everybody.

How do I manage compression settings for various file format via the Magick++ or the MagickCore API?

I know the Convert utility supports the "-define key{=value}..." options and grant an access to manage compression settings for different encoders. But I cannot found the same possibility in programming API.
wizard29
Posts: 58
Joined: 2014-03-21T00:40:16-07:00
Authentication code: 6789
Location: Russia, Saint Petersburg
Contact:

Re: How do I manage a compression settings

Post by wizard29 »

Is it correct to use Image::defineValue for it?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How do I manage a compression settings

Post by snibgo »

I don't use MagickWand, but I think you should use two of the following functions:

Code: Select all

c:\cygwin64\home\Alan\ImageMagick-6.9.0-0>cgrep /iwand\*.h /s*set*compress* /g /f\f\s\r\n

wand\magick-image.h   MagickSetImageCompression(MagickWand *,const CompressionType),
wand\magick-image.h   MagickSetImageCompressionQuality(MagickWand *,const size_t),
wand\magick-property.h   MagickSetCompression(MagickWand *,const CompressionType),
wand\magick-property.h   MagickSetCompressionQuality(MagickWand *,const size_t),
snibgo's IM pages: im.snibgo.com
wizard29
Posts: 58
Joined: 2014-03-21T00:40:16-07:00
Authentication code: 6789
Location: Russia, Saint Petersburg
Contact:

Re: How do I manage a compression settings

Post by wizard29 »

The Image::defineValue works fine!
Thanks!
Post Reply