ImageCreateFromPNG

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rich

    #1

    ImageCreateFromPNG

    I'm writing a php script with the gd library. I had everything working
    wonderfully, however, all of the sudden, If i import two png's into one
    image, the quality of the second png degrades very badly.

    If I only use one, it looks fine. If i load one with
    ImageCreateFrom PNG and reference it twice, it looks fine. It's only
    when I use ImageCreateFrom PNG twice on two different files, the second
    one looks awful. Any suggestions?

  • Philip Ronan

    #2
    Re: ImageCreateFrom PNG

    rich wrote:
    [color=blue]
    > I'm writing a php script with the gd library. I had everything working
    > wonderfully, however, all of the sudden, If i import two png's into one
    > image, the quality of the second png degrades very badly.
    >
    > If I only use one, it looks fine. If i load one with
    > ImageCreateFrom PNG and reference it twice, it looks fine. It's only
    > when I use ImageCreateFrom PNG twice on two different files, the second
    > one looks awful. Any suggestions?
    >[/color]

    You're trying to combine images with different colour tables.

    Use imagecreatetrue color() to make a 24-bit full-colour image, and paste
    your PNGs into that.

    --
    phil [dot] ronan @ virgin [dot] net



    Comment

    • rich

      #3
      Re: ImageCreateFrom PNG

      Excellent! That was it. Thank you much.

      Comment

      Working...