Solved

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

Posted on 2006-06-13
3
630 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
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 33

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE2 application frozen on Windows 10 10 277
Delphi component that can load a DLL in design time? 8 53
How to edit a Pdf 14 66
Performance of SQL statement 37 100
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

896 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

15 Experts available now in Live!

Get 1:1 Help Now