Skip to content

Commit

Permalink
Convert images to RGB and strip metadata (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed May 20, 2017
1 parent 91ff89f commit a60e9bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": ">=5.5.0",
"contao/imagine-svg": "^0.1",
"contao/imagine-svg": "^0.1.4",
"imagine/imagine": "^0.6|^0.7",
"symfony/filesystem": "^2.8|^3.0",
"webmozart/path-util": "^2.0"
Expand Down
3 changes: 3 additions & 0 deletions src/Resizer.php
Expand Up @@ -11,6 +11,7 @@
namespace Contao\Image;

use Imagine\Exception\RuntimeException as ImagineRuntimeException;
use Imagine\Image\Palette\RGB;
use Symfony\Component\Filesystem\Filesystem;
use Webmozart\PathUtil\Path;

Expand Down Expand Up @@ -129,6 +130,8 @@ protected function executeResize(ImageInterface $image, ResizeCoordinatesInterfa
->open($image->getPath())
->resize($coordinates->getSize())
->crop($coordinates->getCropStart(), $coordinates->getCropSize())
->usePalette(new RGB())
->strip()
;

if (isset($imagineOptions['interlace'])) {
Expand Down

0 comments on commit a60e9bc

Please sign in to comment.