in reply to How to improve image resolution...Continued

How are you generating your images? What format are you writing your images to disk in? What compression level (if any) are you specifying when writing them?

What, if anything, you can do to improve the appearance of your images depends very much on what you are already doing.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Replies are listed 'Best First'.
Re^2: How to improve image resolution
by chakkaln (Sexton) on Aug 06, 2005 at 05:49 UTC
    Thanks for the posting. Sorry for not including these details before. I am basically creating an image using the image() and printing it in gif format. The images does nothave smooth margins and also the colors donot appear as true color. I am not aware of any compression. Thanks
    $im = new GD::Image(1000,100); blah...blah print $im->gif;

      Try adding the truecolor parameter when you create your images:

      $im = new GD::Image(1000,100, 1); ## Note the extra parameter!

      From the GD docs:

      The optional third argument, $truecolor, tells new() to create a truecolor GD::Image object. Truecolor images have 24 bits of color data (eight bits each in the red, green and blue channels respectively), allowing for precise photograph-quality color usage. If not specified, the image will use an 8-bit palette for compatibility with older versions of libgd.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
        Hi BrowserUk,

        Thanks for the posting. I tired this earlier but was puzzled to see the white background converting to black. Thought I was commiting some blunder. Apart from this I dint see any change in the resolution or the color (annoyingly, red appears as orange, pink as violet etc)