which function in Magick++ performs like "-layers optimize"?

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
carol_sun
Posts: 19
Joined: 2009-11-06T00:49:59-07:00
Authentication code: 8675309

which function in Magick++ performs like "-layers optimize"?

Post by carol_sun »

"Lets now use the "-layers", method 'OptimizeTransparency' (Added IM v6.3.4-4) to replace any pixel that does change the displayed result with transparency. "
see: http://www.imagemagick.org/Usage/anim_opt/#opt_trans
By using "Transparency Optimization", the gif file size would be reduced.

Except command-line tool, I want to know which function can fulfish this in Magick++. Who can tell me ?
http://www.imagemagick.org/Magick++/STL.html
I didn't find it.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: which function in Magick++ performs like "-layers optimize"?

Post by magick »

The OptimizeImageLayers() method is not currently supported under Magick++ at this time. You can call MagickCore methods from Magick++ with the MagickCore namespace prefix, e.g. MagickCore::OptimizeImageLayers().
carol_sun
Posts: 19
Joined: 2009-11-06T00:49:59-07:00
Authentication code: 8675309

Re: which function in Magick++ performs like "-layers optimi

Post by carol_sun »

thank you very much~
By using both of the functions as follow, the gif image size was reduce.
thumbnails = OptimizeImageLayers(thumbnails, exception);
OptimizeImageTransparency(thumbnails, exception);
Post Reply