cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[BUG]: Phalcon\Image\Adapter When resizing .png loosing transparency

Open borisdelev opened this issue 3 years ago • 2 comments

Describe the bug I can confirm this is issue still exists in Phalcon 5.x - see this: https://github.com/phalcon/cphalcon/issues/16979 I have same problem.

To Reproduce

$image = new \Phalcon\Image\Adapter\GD('image-with-transparent-background.png'); //image with a transparent background
$image->resize(500,500); //any new size
$image->save(); //after saving the image has a black background

Expected behavior Well... to keep PNG transparency or way to maintain that.

Details

  • Phalcon version: 5.2.1
  • PHP Version: 8.1
  • Operating System: Windows
  • Server: Apache

Thank you!!!!

borisdelev avatar Mar 15 '23 18:03 borisdelev

@niden Amm... just a example png file :) Link to Working png Thank you!

borisdelev avatar Jul 06 '23 18:07 borisdelev

Resolved in https://github.com/phalcon/cphalcon/pull/16925

Thank you @borisdelev

niden avatar Apr 28 '26 21:04 niden