Solved

TGifImage (Melanders) - how to set best quality for bitmap to gif conversion

Posted on 2006-06-13
3
629 Views
Last Modified: 2013-11-19
Hi I'm using Melanders TGifImage (on D2005) and assigning a bitmap to a gif but the resulting gif just looks 'orrible. In the GifImage unit it says the default settings are the fastest but worst - does anybody know which settings give the best conversion results please? (Don't care about the speed at all just the quality). Sorry I know nothing but the basics for graphics!
Thanks
P

from code:
//: Default color reduction methods for bitmap import.
  // These are the fastest settings, but also the ones that gives the
  // worst result (in most cases).
  GIFImageDefaultColorReduction: TColorReduction = rmNetscape;
  GIFImageDefaultColorReductionBits: integer = 8; // Range 3 - 8
  GIFImageDefaultDitherMode: TDitherMode = dmNearest;

  //: Default encoder compression method.
  GIFImageDefaultCompression: TGIFCompression = gcLZW;

  //: Default painter thread priority
  GIFImageDefaultThreadPriority: TThreadPriority = tpNormal;

  //: Default animation speed in % of normal speed (range 0 - 1000)
  GIFImageDefaultAnimationSpeed: integer = 100;

  // DoAutoDither is set to True in the initializaion section if the desktop DC
  // supports 256 colors or less.
  // It can be modified in your application to disable/enable Auto Dithering
  DoAutoDither: boolean = False;
0
Comment
Question by:Pandora
  • 2
3 Comments
 
LVL 33

Accepted Solution

by:
Slick812 earned 500 total points
Comment Utility
if you are reducing a 24 bit muticolor bitmap (photo Image) to 8 bit in the TGif Image you might try and set the image color reductions to -

  GIFImageDefaultColorReduction  to  rmQuantize // or  rmQuantizeWindows for standatd color inclusion
 
  GIFImageDefaultDitherMode   to  dmFloydSteinberg  // dmBurkes is also good, and the others give various results depending on the image

  DoAutoDither  to True

but the

TColorReduction = rmNetscape
and
TDitherMode = dmNearest;

do NOT give pleasing results for photographic images

you should read the help files for TGIFImage, I beleive it has some about this
0
 
LVL 33

Expert Comment

by:Slick812
Comment Utility
also, the color reduction settings are mutiple, not just one setting offered, so each setting has a use, depending on what image you start with and what GIF image you want to end with, so you may just experiment with the various settings to see which ones are best suited for your input image and your technical requirements (or maybe visual requirements) for your Gif file, ,  Each of the different TDitherMode settings has a slightly different rendering for closely matched colors like a color gradient, , as to which looks best? but that visulal judgement is up to the viewer
0
 
LVL 1

Author Comment

by:Pandora
Comment Utility
ooh thats much better! Thanks slick, :)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In this second Micro Tutorial in the series,  viewers will learn more basic shortcuts and functions of Illustrator. In this tutorial you will learn about the eyedropper tool, zoom , ellipses and more.
Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now