diff --git a/src/LazyImage/CHANGELOG.md b/src/LazyImage/CHANGELOG.md index 68cded58ab5..bb989a0eee0 100644 --- a/src/LazyImage/CHANGELOG.md +++ b/src/LazyImage/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 2.17.0 + +- Add support for `intervention/image` 3.0+ + ## 2.13.2 - Revert "Change JavaScript package to `type: module`" diff --git a/src/LazyImage/composer.json b/src/LazyImage/composer.json index df2fbba23d9..b964763c412 100644 --- a/src/LazyImage/composer.json +++ b/src/LazyImage/composer.json @@ -34,7 +34,7 @@ "symfony/dependency-injection": "^5.4|^6.0|^7.0" }, "require-dev": { - "intervention/image": "^2.5", + "intervention/image": "^2.5|^3.0", "kornrunner/blurhash": "^1.1", "symfony/cache-contracts": "^2.2", "symfony/framework-bundle": "^5.4|^6.0|^7.0", diff --git a/src/LazyImage/src/BlurHash/BlurHash.php b/src/LazyImage/src/BlurHash/BlurHash.php index 4eef2fee7b5..e38a56f3996 100644 --- a/src/LazyImage/src/BlurHash/BlurHash.php +++ b/src/LazyImage/src/BlurHash/BlurHash.php @@ -11,7 +11,10 @@ namespace Symfony\UX\LazyImage\BlurHash; +use Intervention\Image\Colors\Rgb\Color; +use Intervention\Image\Drivers\Gd\Encoders\JpegEncoder; use Intervention\Image\ImageManager; +use Intervention\Image\ImageManagerStatic; use kornrunner\Blurhash\Blurhash as BlurhashEncoder; use Symfony\Contracts\Cache\CacheInterface; @@ -28,40 +31,24 @@ public function __construct( ) { } - public function createDataUriThumbnail(string $filename, int $width, int $height, int $encodingWidth = 75, int $encodingHeight = 75): string + public static function intervention3(): bool { - if (!$this->imageManager) { - throw new \LogicException('To use the Blurhash feature, install intervention/image.'); - } - if (!class_exists(BlurhashEncoder::class)) { - throw new \LogicException('To use the Blurhash feature, install kornrunner/blurhash.'); - } + return !class_exists(ImageManagerStatic::class); + } + public function createDataUriThumbnail(string $filename, int $width, int $height, int $encodingWidth = 75, int $encodingHeight = 75): string + { // Resize and encode $encoded = $this->encode($filename, $encodingWidth, $encodingHeight); // Create a new blurred thumbnail from encoded BlurHash $pixels = BlurhashEncoder::decode($encoded, $width, $height); - $thumbnail = $this->imageManager->canvas($width, $height); - for ($y = 0; $y < $height; ++$y) { - for ($x = 0; $x < $width; ++$x) { - $thumbnail->pixel($pixels[$y][$x], $x, $y); - } - } - - return 'data:image/jpeg;base64,'.base64_encode($thumbnail->encode('jpg', 80)); + return $this->encodeImage($pixels, $width, $height); } public function encode(string $filename, int $encodingWidth = 75, int $encodingHeight = 75): string { - if (!$this->imageManager) { - throw new \LogicException('To use the Blurhash feature, install intervention/image.'); - } - if (!class_exists(BlurhashEncoder::class)) { - throw new \LogicException('To use the Blurhash feature, install kornrunner/blurhash.'); - } - if ($this->cache) { return $this->cache->get( 'blurhash.'.hash('xxh3', $filename.$encodingWidth.$encodingHeight), @@ -74,6 +61,37 @@ public function encode(string $filename, int $encodingWidth = 75, int $encodingH private function doEncode(string $filename, int $encodingWidth = 75, int $encodingHeight = 75): string { + if (!$this->imageManager) { + throw new \LogicException('To use the Blurhash feature, install intervention/image.'); + } + + if (!class_exists(BlurhashEncoder::class)) { + throw new \LogicException('To use the Blurhash feature, install kornrunner/blurhash.'); + } + + return BlurhashEncoder::encode($this->generatePixels($filename, $encodingWidth, $encodingHeight), 4, 3); + } + + private function generatePixels(string $filename, int $encodingWidth, int $encodingHeight): array + { + if (self::intervention3()) { + $image = $this->imageManager->read($filename)->scale($encodingWidth, $encodingHeight); + $width = $image->width(); + $height = $image->height(); + $pixels = []; + + for ($y = 0; $y < $height; ++$y) { + $row = []; + for ($x = 0; $x < $width; ++$x) { + $row[] = $image->pickColor($x, $y)->toArray(); + } + + $pixels[] = $row; + } + + return $pixels; + } + // Resize image to increase encoding performance $image = $this->imageManager->make(file_get_contents($filename)); $image->resize($encodingWidth, $encodingHeight, static function ($constraint) { @@ -84,8 +102,8 @@ private function doEncode(string $filename, int $encodingWidth = 75, int $encodi // Encode using BlurHash $width = $image->getWidth(); $height = $image->getHeight(); - $pixels = []; + for ($y = 0; $y < $height; ++$y) { $row = []; for ($x = 0; $x < $width; ++$x) { @@ -96,6 +114,31 @@ private function doEncode(string $filename, int $encodingWidth = 75, int $encodi $pixels[] = $row; } - return BlurhashEncoder::encode($pixels, 4, 3); + return $pixels; + } + + private function encodeImage(array $pixels, int $width, int $height): string + { + if (self::intervention3()) { + $thumbnail = $this->imageManager->create($width, $height); + + for ($y = 0; $y < $height; ++$y) { + for ($x = 0; $x < $width; ++$x) { + $thumbnail->drawPixel($x, $y, new Color($pixels[$y][$x][0], $pixels[$y][$x][1], $pixels[$y][$x][2])); + } + } + + return $thumbnail->encode(new JpegEncoder(80))->toDataUri(); + } + + $thumbnail = $this->imageManager->canvas($width, $height); + + for ($y = 0; $y < $height; ++$y) { + for ($x = 0; $x < $width; ++$x) { + $thumbnail->pixel($pixels[$y][$x], $x, $y); + } + } + + return 'data:image/jpeg;base64,'.base64_encode($thumbnail->encode('jpg', 80)); } } diff --git a/src/LazyImage/src/DependencyInjection/LazyImageExtension.php b/src/LazyImage/src/DependencyInjection/LazyImageExtension.php index 8089ed5b0bc..c24104587f6 100644 --- a/src/LazyImage/src/DependencyInjection/LazyImageExtension.php +++ b/src/LazyImage/src/DependencyInjection/LazyImageExtension.php @@ -11,6 +11,7 @@ namespace Symfony\UX\LazyImage\DependencyInjection; +use Intervention\Image\Drivers\Gd\Driver; use Intervention\Image\ImageManager; use Symfony\Component\AssetMapper\AssetMapperInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -38,6 +39,7 @@ public function load(array $configs, ContainerBuilder $container) if (class_exists(ImageManager::class)) { $container ->setDefinition('lazy_image.image_manager', new Definition(ImageManager::class)) + ->addArgument(BlurHash::intervention3() ? Driver::class : []) ->setPublic(false) ; } @@ -45,7 +47,6 @@ public function load(array $configs, ContainerBuilder $container) $container ->setDefinition('lazy_image.blur_hash', new Definition(BlurHash::class)) ->setArgument(0, new Reference('lazy_image.image_manager', ContainerInterface::NULL_ON_INVALID_REFERENCE)) - ->setPublic(false) ; if (isset($config['cache'])) { diff --git a/src/LazyImage/tests/BlurHash/BlurHashTest.php b/src/LazyImage/tests/BlurHash/BlurHashTest.php index 503c5234eba..6de74f0f618 100644 --- a/src/LazyImage/tests/BlurHash/BlurHashTest.php +++ b/src/LazyImage/tests/BlurHash/BlurHashTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\UX\LazyImage\Tests; +namespace Symfony\UX\LazyImage\Tests\BlurHash; use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\Adapter\ArrayAdapter; @@ -37,7 +37,7 @@ public function testEncode() $blurHash = $container->get('test.lazy_image.blur_hash'); $this->assertSame( - 'L54ec*~q_3?bofoffQWB9F9FD%IU', + BlurHash::intervention3() ? 'LnMtaO9FD%IU%MRjayRj~qIUM{of' : 'L54ec*~q_3?bofoffQWB9F9FD%IU', $blurHash->encode(__DIR__.'/../Fixtures/logo.png') ); } @@ -105,7 +105,7 @@ public function testCreateDataUriThumbnail() $this->assertNull($this->extractCache($blurHash)); $this->assertSame( - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgAOgDqAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVld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M81lXF+zkhfzqO8NVKAFd2c5Y5pKKKACiiigAooooAKKKKACiiigBQxHQ08TOO9R0UATfaHpDcOaiooAeZXPemEk9aKKACiiigAooooAKKKKAP/9k=', $blurHash->createDataUriThumbnail(__DIR__.'/../Fixtures/logo.png', 234, 58) ); } @@ -149,20 +149,47 @@ public function registerContainerConfiguration(LoaderInterface $loader) $this->assertEmpty($cache->getValues()); $this->assertSame( - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgAOgDqAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A8k8g00wH0rofsftTTZ+1AHOtAaieA10bWftUL2ftQBzbwGq0kBrppLT2qrLae1AHMSwGs+4tyc11ctr7VRntfagDj5oWQk44qGuluLQc8Vk3VngkrxQBQopWUqcGkoAKKKKACiiigAooqRIXbtQBHRVtLMnrUy2Q9KAM6itQWQ9KDZD0oAy6K0Gsh6VE9oR0oAqUVI8Lr2qMjHWgAooooAKKKKAPov7OPSmm3HpWhgU1gKAM1rcelQPbj0rUcCoJAKAMmSAelVJYB6VsSgVTlAoAxpoR6VRnhHpWzMBWfOBzQBi3EI5rLuYRg8Vu3GOayrnHNAHO3sA5IrPPBravMYNYz/eNACUUUUAFKqljgUlTWwGaALFvbjvV+KAelNgA4q7EBQAiQj0qVYR6VKgqZRQBX8kelBhHpVoCgigCk0I9KheEelaDAVC4FAGZLAKpT249K2JAKpzAUAY0iFTTKuXAHNU6ACiiigD6S84U1phWP9s96abz3oA1XmFQSTCs1rv3qB7v3oA0JZh61TllFUpbv3qpLd+9AFqaUVnzyiq812Oeaz7i7HPNAE1xKOeayrqYc81Dd3ygHJrGubxpCQvT1oAde3GThapUHmigAooooAKdG21s02igDUt5gQOavxSCueRyh4q3Dd44NAHQJJUyyVix3QPerC3I9aANTzKDIKzhcj1pDcj1oAvtJULyVSa5HrVeS7A70AXJZBVGeYDPNVpbvPSqruzHk0APmk3HioqKKACiiigD1X7WfWmm7PrVA000AXGuz61C92fWqrVA9AFiS8PrVSa896hlqlP3oAfcX+M81lXF+zkhfzqO8NVKAFd2c5Y5pKKKACiiigAooooAKKKKACiiigBQxHQ08TOO9R0UATfaHpDcOaiooAeZXPemEk9aKKACiiigAooooAKKKKAP/9k=', + BlurHash::intervention3() ? 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSl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tyc11ctr7VRntfagDj5oWQk44qGuluLQc8Vk3VngkrxQBQopWUqcGkoAKKKKACiiigAooqRIXbtQBHRVtLMnrUy2Q9KAM6itQWQ9KDZD0oAy6K0Gsh6VE9oR0oAqUVI8Lr2qMjHWgAooooAKKKKAPov7OPSmm3HpWhgU1gKAM1rcelQPbj0rUcCoJAKAMmSAelVJYB6VsSgVTlAoAxpoR6VRnhHpWzMBWfOBzQBi3EI5rLuYRg8Vu3GOayrnHNAHO3sA5IrPPBravMYNYz/eNACUUUUAFKqljgUlTWwGaALFvbjvV+KAelNgA4q7EBQAiQj0qVYR6VKgqZRQBX8kelBhHpVoCgigCk0I9KheEelaDAVC4FAGZLAKpT249K2JAKpzAUAY0iFTTKuXAHNU6ACiiigD6S84U1phWP9s96abz3oA1XmFQSTCs1rv3qB7v3oA0JZh61TllFUpbv3qpLd+9AFqaUVnzyiq812Oeaz7i7HPNAE1xKOeayrqYc81Dd3ygHJrGubxpCQvT1oAde3GThapUHmigAooooAKdG21s02igDUt5gQOavxSCueRyh4q3Dd44NAHQJJUyyVix3QPerC3I9aANTzKDIKzhcj1pDcj1oAvtJULyVSa5HrVeS7A70AXJZBVGeYDPNVpbvPSqruzHk0APmk3HioqKKACiiigD1X7WfWmm7PrVA000AXGuz61C92fWqrVA9AFiS8PrVSa896hlqlP3oAfcX+M81lXF+zkhfzqO8NVKAFd2c5Y5pKKKACiiigAooooAKKKKACiiigBQxHQ08TOO9R0UATfaHpDcOaiooAeZXPemEk9aKKACiiigAooooAKKKKAP/9k=', $blurHash->createDataUriThumbnail(__DIR__.'/../Fixtures/logo.png', 234, 58) ); $this->assertNotEmpty($cache->getValues()); $this->assertSame( - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGB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NAHO3sA5IrPPBravMYNYz/eNACUUUUAFKqljgUlTWwGaALFvbjvV+KAelNgA4q7EBQAiQj0qVYR6VKgqZRQBX8kelBhHpVoCgigCk0I9KheEelaDAVC4FAGZLAKpT249K2JAKpzAUAY0iFTTKuXAHNU6ACiiigD6S84U1phWP9s96abz3oA1XmFQSTCs1rv3qB7v3oA0JZh61TllFUpbv3qpLd+9AFqaUVnzyiq812Oeaz7i7HPNAE1xKOeayrqYc81Dd3ygHJrGubxpCQvT1oAde3GThapUHmigAooooAKdG21s02igDUt5gQOavxSCueRyh4q3Dd44NAHQJJUyyVix3QPerC3I9aANTzKDIKzhcj1pDcj1oAvtJULyVSa5HrVeS7A70AXJZBVGeYDPNVpbvPSqruzHk0APmk3HioqKKACiiigD1X7WfWmm7PrVA000AXGuz61C92fWqrVA9AFiS8PrVSa896hlqlP3oAfcX+M81lXF+zkhfzqO8NVKAFd2c5Y5pKKKACiiigAooooAKKKKACiiigBQxHQ08TOO9R0UATfaHpDcOaiooAeZXPemEk9aKKACiiigAooooAKKKKAP/9k=', + BlurHash::intervention3() ? 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gODAK/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AAEQgAOgDqAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZH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XAHNU6ACiiigD6S84U1phWP9s96abz3oA1XmFQSTCs1rv3qB7v3oA0JZh61TllFUpbv3qpLd+9AFqaUVnzyiq812Oeaz7i7HPNAE1xKOeayrqYc81Dd3ygHJrGubxpCQvT1oAde3GThapUHmigAooooAKdG21s02igDUt5gQOavxSCueRyh4q3Dd44NAHQJJUyyVix3QPerC3I9aANTzKDIKzhcj1pDcj1oAvtJULyVSa5HrVeS7A70AXJZBVGeYDPNVpbvPSqruzHk0APmk3HioqKKACiiigD1X7WfWmm7PrVA000AXGuz61C92fWqrVA9AFiS8PrVSa896hlqlP3oAfcX+M81lXF+zkhfzqO8NVKAFd2c5Y5pKKKACiiigAooooAKKKKACiiigBQxHQ08TOO9R0UATfaHpDcOaiooAeZXPemEk9aKKACiiigAooooAKKKKAP/9k=', $blurHash->createDataUriThumbnail(__DIR__.'/../Fixtures/logo.png', 234, 58) ); $this->assertNotEmpty($cache->getValues()); } + public function testTwigExtension() + { + $kernel = new TwigAppKernel('test', true); + $kernel->boot(); + $twig = $kernel->getContainer()->get('test.service_container')->get('twig'); + $output = $twig->createTemplate(<<render(['file' => __DIR__.'/../Fixtures/logo.png']); + + if (BlurHash::intervention3()) { + $expected = <<assertSame($expected, $output); + + $kernel->shutdown(); + } + private function extractCache(BlurHash $blurHash): ?CacheInterface { return \Closure::bind(fn () => $this->cache, $blurHash, BlurHash::class)();