?
Solved

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

Posted on 2006-06-13
3
Medium Priority
?
652 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Slick812 earned 2000 total points
ID: 16899558
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 34

Expert Comment

by:Slick812
ID: 16899679
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
ID: 16901181
ooh thats much better! Thanks slick, :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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.
In this Micro Tutorial viewers will learn the basic shortcuts and functions in InDesign.
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

752 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