widMan Posted October 1, 2017 Share Posted October 1, 2017 The picture is not right. On windows it works well and on linux no. (Windows) (CORRECT) (Linux) (INCORRECT) Code: header('Content-Type: image/png;'); $im = @imagecreatefrompng('ph.png'); $im2 = @imagecreatefrompng("assets/images/skins/Skin_170.png"); $im2 = imagescale($im2, 54, 100); imagecopy($im, $im2, 3, 30, 0, 0, imagesx($im2), imagesy($im2)); $text_color = imagecolorallocate($im, 31,31,31); $font = 'assets/fonts/arc.otf'; imagepng($im); imagedestroy($im); Quote Link to comment https://forums.phpfreaks.com/topic/305168-php-image-problem/ Share on other sites More sharing options...
requinix Posted October 1, 2017 Share Posted October 1, 2017 imagecopy() isn't actually that good. Try imagecopyresampled(). Quote Link to comment https://forums.phpfreaks.com/topic/305168-php-image-problem/#findComment-1552195 Share on other sites More sharing options...
widMan Posted October 4, 2017 Author Share Posted October 4, 2017 imagecopy() isn't actually that good. Try imagecopyresampled(). Don't work. The image not show. Quote Link to comment https://forums.phpfreaks.com/topic/305168-php-image-problem/#findComment-1552358 Share on other sites More sharing options...
gizmola Posted October 4, 2017 Share Posted October 4, 2017 If you remove the @ symbols do you get errors? What are the versions of all the gd components and packages. What distro and version of linux are you using? Quote Link to comment https://forums.phpfreaks.com/topic/305168-php-image-problem/#findComment-1552359 Share on other sites More sharing options...
Solution widMan Posted October 5, 2017 Author Solution Share Posted October 5, 2017 Solved with (imagecopyresized) Closed. Quote Link to comment https://forums.phpfreaks.com/topic/305168-php-image-problem/#findComment-1552393 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.