Acoon Posted August 14, 2011 Share Posted August 14, 2011 So, I got a weird problem with my .png images in GD. Some look all screwed up and wrong sizes etc. But only the ones that is transparent. Regular png images with no blending works fine. I have this problem on my server. However, on my workstation i have easyPHP with PHP, apache, mysql etc for developing. There it works. They both has png support as shown in phpinfo(): PNG Support enabled And they are both GD version 2.0.34 compatible. The only real difference i can see is that on my workstation i have an extra line in GD in phpinfo(). libPNG Version 1.2.44 So my question is, what does this mean in regards to functionality? Br, Acoon Quote Link to comment https://forums.phpfreaks.com/topic/244781-libpng-or-not-in-phpinfo/ Share on other sites More sharing options...
xyph Posted August 14, 2011 Share Posted August 14, 2011 You probably don't have libPNG installed on your server. GD should support PNG out of the box, but the support is pretty meh from what I've read. libPNG is probably the solution. Quote Link to comment https://forums.phpfreaks.com/topic/244781-libpng-or-not-in-phpinfo/#findComment-1257297 Share on other sites More sharing options...
Acoon Posted August 14, 2011 Author Share Posted August 14, 2011 You probably don't have libPNG installed on your server. GD should support PNG out of the box, but the support is pretty meh from what I've read. libPNG is probably the solution. Thanks for your reply. It seems libpng is already installed on the server. Any idea on how to 'enable' it in php? [root@vps1 ~]# yum install libpng.x86_64 Package 2:libpng-1.2.10-7.1.el5_5.3.x86_64 already installed and latest version Nothing to do Br, Acoon Quote Link to comment https://forums.phpfreaks.com/topic/244781-libpng-or-not-in-phpinfo/#findComment-1257302 Share on other sites More sharing options...
xyph Posted August 14, 2011 Share Posted August 14, 2011 Check your Configure Command in PHP info. Also check print_r( gd_info() ); Or try compiling with --with-png-dir=/usr/local Quote Link to comment https://forums.phpfreaks.com/topic/244781-libpng-or-not-in-phpinfo/#findComment-1257306 Share on other sites More sharing options...
Acoon Posted August 14, 2011 Author Share Posted August 14, 2011 Check your Configure Command in PHP info. Also check print_r( gd_info() ); Same on both computers... Array ( [GD Version] => bundled (2.0.34 compatible) [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => [GIF Read Support] => 1 [GIF Create Support] => 1 [JPEG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => [XBM Support] => 1 [JIS-mapped Japanese Font Support] => ) Quote Link to comment https://forums.phpfreaks.com/topic/244781-libpng-or-not-in-phpinfo/#findComment-1257311 Share on other sites More sharing options...
xyph Posted August 14, 2011 Share Posted August 14, 2011 There could be an error loading libPNG. It's obviously there, but PHP might not know where it is. I've heard about issues using relative paths. Not sure how I can help beyond making sure you've compiled with --with-png-dir=/dir/to/libPNG Quote Link to comment https://forums.phpfreaks.com/topic/244781-libpng-or-not-in-phpinfo/#findComment-1257314 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.