Skip to content

Commit

Permalink
Merge pull request #707 from Seldaek/fix-regression
Browse files Browse the repository at this point in the history
Fix regression introduced in bb8e410
  • Loading branch information
makasim committed Feb 13, 2016
2 parents 708785a + 9404e37 commit 73a6497
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Imagine/Filter/PostProcessor/JpegOptimPostProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Liip\ImagineBundle\Binary\BinaryInterface;
use Liip\ImagineBundle\Binary\FileBinaryInterface;
use Liip\ImagineBundle\Model\FileBinary;
use Liip\ImagineBundle\Model\Binary;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\ProcessBuilder;

Expand Down Expand Up @@ -127,7 +127,7 @@ public function process(BinaryInterface $binary)
throw new ProcessFailedException($proc);
}

$result = new FileBinary($input, $binary->getMimeType(), $binary->getFormat());
$result = new Binary(file_get_contents($input), $binary->getMimeType(), $binary->getFormat());

unlink($input);

Expand Down
4 changes: 2 additions & 2 deletions Imagine/Filter/PostProcessor/OptiPngPostProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Liip\ImagineBundle\Binary\BinaryInterface;
use Liip\ImagineBundle\Binary\FileBinaryInterface;
use Liip\ImagineBundle\Model\FileBinary;
use Liip\ImagineBundle\Model\Binary;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\ProcessBuilder;

Expand Down Expand Up @@ -57,7 +57,7 @@ public function process(BinaryInterface $binary)
throw new ProcessFailedException($proc);
}

$result = new FileBinary($input, $binary->getMimeType(), $binary->getFormat());
$result = new Binary(file_get_contents($input), $binary->getMimeType(), $binary->getFormat());

unlink($input);

Expand Down

0 comments on commit 73a6497

Please sign in to comment.