#40069 [Fbk]: resizing png

From: Date: Tue, 09 Jan 2007 01:47:20 +0000
Subject: #40069 [Fbk]: resizing png
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107341@lists.php.net to get a copy of this message
ID: 40069 Updated by: pajoye@php.net Reported By: alex at gateway-productions dot com Status: Feedback Bug Type: GD related Operating System: Linux PHP Version: 5.2.0 New Comment: If it does not work with the snapshots, please provide a source image (a link to). Previous Comments: ------------------------------------------------------------------------ [2007-01-09 00:59:50] iliaa@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip ------------------------------------------------------------------------ [2007-01-09 00:57:19] alex at gateway-productions dot com Description: ------------ imagecopyresampled() returns a blank resized image with alpha not the source resized with alpha Reproduce code: --------------- $im = ImageCreateFromPNG($sourcefile); $im_dest = imagecreatetruecolor ($sourcefile_new_width, $sourcefile_new_height); imagealphablending($im_dest, false); imagecopyresampled($im_dest, $im, 0, 0, 0, 0, $sourcefile_width, $sourcefile_height, $sourcefile_new_width, $sourcefile_new_height); imagesavealpha($im_dest, true); imagepng($im_dest, $destfile); imagedestroy($im_dest); Expected result: ---------------- resizing actuall source png while keeping transparency and saving file Actual result: -------------- returns a blank resized image with alpha not the source resized with alpha ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40069&edit=1

« previous php.bugs (#107341) next »