Skip to content

Commit

Permalink
2017-04-06 1150
Browse files Browse the repository at this point in the history
  • Loading branch information
allanmcarvalho committed Apr 6, 2017
1 parent 7bbbde5 commit 4f41d03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/File/Writer/ImageWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ public function write()
$image = $this->getImage($this->fileInfo['tmp_name']);

$this->modifyImage($image);


$image->interlace(true);
if ($image->save("{$this->getPath()}{$this->getFilename()}", $this->getConfigImageQuality()))
{
return $this->entity->set($this->field, "{$this->getFileName()}");
Expand Down
2 changes: 1 addition & 1 deletion src/File/Writer/Traits/ImageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ protected function createThumbnails()
$watermarkOpacity = Hash::get($thumbnail, 'watermark.opacity', $this->watermark_opacity);
$this->insertWatermark($newThumbnail, $watermarkPath, $watermarkPosition, $watermarkOpacity);
}

$newThumbnail->interlace(true);
if (!$newThumbnail->save($this->getPath($label) . $this->getFilename(), $this->getConfigImageQuality()))
{
\Cake\Log\Log::error(__d('upload', 'Unable to salve thumbnail "{0}" in entity id "{1}" from table "{2}" and path "{3}" because it does not exist', $this->getFileName(), $this->entity->get($this->table->getPrimaryKey()), $this->table->getTable(), $this->getPath()));
Expand Down

0 comments on commit 4f41d03

Please sign in to comment.