From 4f41d03988e425d4cd800f5a37a88fff41628aa1 Mon Sep 17 00:00:00 2001 From: Allan Mariucci Carvalho Date: Thu, 6 Apr 2017 11:50:54 -0300 Subject: [PATCH] 2017-04-06 1150 --- src/File/Writer/ImageWriter.php | 4 ++-- src/File/Writer/Traits/ImageTrait.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/File/Writer/ImageWriter.php b/src/File/Writer/ImageWriter.php index 96a69b4..edb50c7 100644 --- a/src/File/Writer/ImageWriter.php +++ b/src/File/Writer/ImageWriter.php @@ -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()}"); diff --git a/src/File/Writer/Traits/ImageTrait.php b/src/File/Writer/Traits/ImageTrait.php index 9a538ca..6e427d8 100644 --- a/src/File/Writer/Traits/ImageTrait.php +++ b/src/File/Writer/Traits/ImageTrait.php @@ -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()));