Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libs/vendor/Imagine/Gd/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ final public function resize(BoxInterface $size, $filter = ImageInterface::FILTE
final public function rotate($angle, ColorInterface $background = null)
{
$color = $background ? $background : $this->palette->color('fff');
$resource = imagerotate($this->resource, -1 * $angle, $this->getColor($color));
imagealphablending($this->resource, true);
$resource = imagerotate($this->resource, -1 * $angle, imageColorAllocateAlpha($this->resource, 0, 0, 0, 127));
imagealphablending($resource, false);
imagesavealpha($resource, true);

if (false === $resource) {
throw new RuntimeException('Image rotate operation failed');
Expand Down