in reply to Creating PNG's using GD from an existing PNG...issues with colors

What am I doing wrong here?

Firstly, you are failing to meet the fairly rudimentary requirements of posting at Perlmonks.

  1. Failing to use the simple formating markup required by the site. (Hint:<pre></pre> tags are verbotten!)
  2. Why post your code offsite rather than here? What sense will your post and any answers have when your offsite code is no longer available?

The probable cause of your problem is that you are trying to use palletised colors (8-bit) on a truecolor (24-bit) image.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)
  • Comment on Re: Creating PNG's using GD from an existing PNG...issues with colors
  • Download Code

Replies are listed 'Best First'.
Re^2: Creating PNG's using GD from an existing PNG...issues with colors
by elsif (Initiate) on Aug 27, 2009 at 03:42 UTC
    Sorry, I suck. Will post appropriately in the future. In any case, yes, truecolor is what did the trick. Thanks, -Jake

      In the interest of improving the site, what would have caught your attention enough that you would have noticed that pre tags were bad here?


      True laziness is hard work

        I wish I could ++ this more than once.

        In a place I used to work, all defects / mistakes / hiccups were costed as "people hours lost". With "real" money being tagged to each event (and billed to the offending department), root cause analysis was also very big, and caused us to not only identify the root cause of every event, but to also put into place corrective action to keep it from happening again.

        This is the sort of thing that improves a site for the next group of people coming in, rather than repeating the same mistakes over and over and over and over (*smack*) again.

        --MidLifeXis

        Please consider supporting my wife as she walks in the 2009 Alzheimer's Walk.