use global color table instead of local color table

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
echo1986
Posts: 3
Joined: 2012-07-18T05:05:06-07:00
Authentication code: 15

use global color table instead of local color table

Post by echo1986 »

Hi, all
Now,I am using Magickcore API for my project,In order to reduce Gif file size,I need to use global color table instead of local color table,but I can't find any C api that can fix my problem.
thanks for any help. :D
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: use global color table instead of local color table

Post by magick »

ImageMagick utilizes a global colormap if all images in your sequence have the exact same colormap. You can ensure it does with the RemapImages() method.
echo1986
Posts: 3
Joined: 2012-07-18T05:05:06-07:00
Authentication code: 15

Re: use global color table instead of local color table

Post by echo1986 »

magick wrote:ImageMagick utilizes a global colormap if all images in your sequence have the exact same colormap. You can ensure it does with the RemapImages() method.
Thanks for your quick respondse,after using QuantizeImages(),size of my gif has been increased form 141163 bytes to 179110 bytes,in your advice in this topic(viewtopic.php?f=7&t=14172),I attempt to solve this problem with RemapImages() as follows ,object image was set up by BlobToImage() a gif.

Code: Select all

remap_image = GetLastImageInList(image);
         //remap_image = GetImageFromList(image, 2);
         RemapImages(p_QuantizeInfo, image, remap_image);
I just want to set a global colormap,regard the last image in imagel list as remap image,but it dosen't work as anticipation,can't chage file size, what's problem in my code?
echo1986
Posts: 3
Joined: 2012-07-18T05:05:06-07:00
Authentication code: 15

Re: use global color table instead of local color table

Post by echo1986 »

I have resolved the Problem, when I use methord QuantizeImages() ,I don't set parameter whether dither or not,After set QuantizeInfo.dither=MagickFalse,It reach original file size.
Post Reply