preserve transparency
Opened this issue · 0 comments
devozanges commented
I've just been looking everywhere for ways to keep the transparent background of my PNGs, maybe adding a line in the doc could be useful for others, in the meantime, you have to do it like that:
$transparent = true;
Image::open($imageSourcePath)
->zoomCrop($width, $height, $transparent ? 'transparent' : $hexaColor, 'center', 'center')
->save($imageTargetPath, $extension, 85)
;