Skip to content

Commit

Permalink
Fixed truecolor issue resulting in big file sizes (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertMN committed Dec 9, 2020
1 parent 72be1e2 commit a5ec9f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ImageResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public function save($filename, $image_type = null, $quality = null, $permission
break;

case IMAGETYPE_PNG:
if (!$this->quality_truecolor && !imageistruecolor($this->source_image)) {
if (!$this->quality_truecolor || !imageistruecolor($this->source_image)) {
if( !empty($exact_size) && is_array($exact_size) ){
$dest_image = imagecreate($exact_size[0], $exact_size[1]);
} else{
Expand Down

0 comments on commit a5ec9f4

Please sign in to comment.