in reply to Re^3: Resizing images with transparent background?
in thread Resizing images with transparent background?

It runs with the gd, but transparent() returns "255" for gif and "-1" for png. The result is black background for both. I think I'll just go with ImageMagick and resize to png since that gives me a real alpha channel and not just a single color transparency, as a result i get smooth edges.

Thanks a lot for your help.

  • Comment on Re^4: Resizing images with transparent background?

Replies are listed 'Best First'.
Re^5: Resizing images with transparent background?
by BrowserUk (Patriarch) on Oct 14, 2010 at 14:14 UTC
    Thanks a lot for your help

    But in the interests of finding a fix for Image::Resize, could you post one of your images with a transparent background on ImageBin for me to play with?


    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.

      Well I couldn't upload the file I was playing with since it is a copyrighted logo, but I made you 2 new files (gif and png)

      Have fun!

        Hm. It seems that GD's handling of pngs with transparency is broken, If you just load the png and then write it back to a new file, the transparency is screwed. Replaced by black. Doing the same with the gif version worked okay.

        Whether the fault lies in GD; or the underlying libgd; or the libraries that underlie that is questionable. But given that libgd seemed to have died a death, I guess it's time to move on and find something else that provides similar functionality without requiring your conversion to O'Woe in order to use it.


        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.