png image transparent background on thumbnail resize becomes black...

Hello :)

When a png image file with transparent background is uploaded, when it is resized for thumbnail view, it converts to an image with black background, where it was transparent before...

Is there any way i could make it:

1.) to resize with WHITE background, not black, as it is now
2.) to resize to same png format image (not jpg) and keep transparent background where it was?

Thanks for your replies in advance, guys!
Cheers! :)

P.S.
Thanks for that great gallery!

Comments

  • This seems like a bug. Can you create a ticket on Trac so we can deal with it?
  • The same thing happens with .gifs (animated and non-animated). In the thumbnail of each gif, the areas that are transparent on the original image end up black on the thumbnail.

    If it isn't possible to fix that, would it be possible to use my own premade .gif thumbs? I tried putting them in the cache folder but the .jpg version is always used, and if I delete it a new one is made.. I can't get it to use the .gif thumbnail.

    Thanks for any help!
  • acrylian Administrator, Developer
    No, sorry, the internal image processor only creates jpgs. So even if you upload gifs or pngs they will be turned into jpgs. This is always the case for thumbnails. But you can show gifs and pngs directly on the image.php page (the bigger image we call "sized image") if they are the same size or small than the image size setting on the theme options tab.
  • Thanks for your help acrylian,

    Would you know if it is possible then to not have thumbnails generated at all, and to display the original image as the thumbnail (the images I'm displaying are very small sized .gifs)?
  • acrylian Administrator, Developer
    Sorry again, no, this is just not the way Zenphoto works.
  • You can, of course, display the original image. But if you want a small version you would have to use the browser resizing since zenphoto if it resizes an image will always create a jpeg.

    You would change the theme where it is printing a thumbnail to print the full image. There is no function which does that, though so you will have to create the HTML using the getUnprotectedImage function.
  • :( just discovered the same thing. wanted to use zenphoto for new project of mine. what a pity

    anyhow I use zenphoto for a lot of projects. I'm very happy about it.

    thanks anyway for everything.
    have a nice day

    cheers, stinie
  • acrylian Administrator, Developer
    Just to note, Zenphoto does not turn everything into jpegs anymore (since 1.2.6 or 1.2.5, not sure right now). Sadly the GDlib is the reason for transparency to not work correctly. This is sadly out of our hands.
Sign In or Register to comment.