On Tue, 27 Oct 2009 19:44:42 +0800
ZHOU Xiao-bo <[email protected]> wrote:

| hi:
| 
|     I found that when I resize and quantize a gif such as
| 
|                  "http://img1.cache.netease.com/img09/logo/logo.gif";
| 
|     using "convert logo.gif -resize 160x46 -colors 16 out.gif", I got a
|     gif with bad quality.
| 
|      But if I use "convert logo.gif -resize 160x46 tmp,gif"; and then
|      "convert tmp.gif -colors 16 out.gif", the quality is much better.
| 
|       I think it's because the platte has been changed when resizing.
|       I found that platte of 'tmp.gif'  is much larger than that of
| logo.gif.
|       So, how can I get the better output image in c++ code?
|        thanks a lot.
|                                     ZHOU Xiaobo
|
Resize does not change the palette, it destroys the palette as it generate
completely new colors as part of the process.

The save to gif however restricted the colors to a new 256 color palette
as part of the save.  This may be the cause of the improved result

You could try the equivalent of
   convert logo.gif -resize 160x46 -colors 256 -colors 16 out.gif

Also you may like to try using a different dither, 
   -dither FloydSteinberg
which may produce a better result for small images.


  Anthony Thyssen ( System Programmer )    <[email protected]>
 -----------------------------------------------------------------------------
     `` Well you know what they say... All Good Things... ''
                               StarTrek, New Generations (Final Epsoide)
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to