21490 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 484 Views |
-
Resizing PNG - grey background - how to eliminate?

28 September 2011 at 2:11pm
I don't think I've seen this discussed before and a search didn't turn up much. I'd like to know if anybody has any success in modifying the image resizing methods to accommodate PNG images that have transparency. It seems that in the process of resizing, it converts the image to a jpg and that gets rid of the transparency. Unfortunately, that results in a grey background, which looks quite ugly on some images that are meant to have transparency.
Any tips or suggestions please?
-
Re: Resizing PNG - grey background - how to eliminate?

29 September 2011 at 8:27am
Which version of SS are you running. I remember it was an issue but works fine 2.4
-
Re: Resizing PNG - grey background - how to eliminate?

29 September 2011 at 8:44am
I'm actually using 2.4.5
-
Re: Resizing PNG - grey background - how to eliminate?

29 September 2011 at 9:00am
Only thing I can think of is your environment includes and older version of the GD library that doesn't support imagesavealpha(). The function used to keep transparency (its called in the silverstripe GD wrapper). I know I've had this problem on certain hosts when their "default" php build is missing some updated or usually included modules. Takes forever to debug those
-
Re: Resizing PNG - grey background - how to eliminate?

29 September 2011 at 9:16am
The GD library came bundled with my server stack. It seems to be the latest version.
Running PHP 5.3.5 if that helps to know.GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.2.1
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 6b
PNG Support enabled
libPNG Version 1.2.10
WBMP Support enabled
XPM Support enabled
XBM Support enabled -
Re: Resizing PNG - grey background - how to eliminate?

29 September 2011 at 9:27am
Hmm should be working, I know its working on 2.4.2 which leads me to believe its something to do with your specific install. Try writing a specific function to resize a png and see if fails. Something like this
http://www.akemapa.com/2008/07/10/php-gd-resize-transparent-image-png-gif/Also check your logs to see if there's any error. I know the GD library actually needs a lot of memory if you're resizing a lot large images.
Finally check to make sure there aren't any extra alpha channels or paths in your image I know that has cause weird errors in the past for me
| 484 Views | ||
|
Page:
1
|
Go to Top |


