Created
September 10, 2012 15:32
-
-
Save dator-zz/3691568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// here is my previous code, i open and save directly the original size and there was a transparency issue. | |
$imagine = new Imagine\Gd\Imagine(); | |
$image = $imagine->open($file->getTempName()) | |
->save('path'), array('quality' => 95)); | |
// with this, no more issue, because resize use the imagealphablending function | |
$imagine = new Imagine\Gd\Imagine(); | |
list($w, $h) = getimagesize($file->getTempName()); | |
$image = $imagine->open($file->getTempName()) | |
->resize(new Box($w, $h)) | |
->save('path'), array('quality' => 95)); | |
// I think it's a bug, because if i want to save the original size without "working" on the image, i also want to keep the transparency :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment