Skip to content

Commit d36a7bc

Browse files
Fix gamma correction
1 parent 2a38f3a commit d36a7bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/ImageResize.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ public function save($filename, $image_type = null, $quality = null, $permission
262262
}
263263

264264
imageinterlace($dest_image, $this->interlace);
265-
265+
266+
imagegammacorrect($this->source_image, 2.2, 1.0);
267+
266268
imagecopyresampled(
267269
$dest_image,
268270
$this->source_image,
@@ -275,6 +277,8 @@ public function save($filename, $image_type = null, $quality = null, $permission
275277
$this->source_w,
276278
$this->source_h
277279
);
280+
281+
imagegammacorrect($dest_image, 1.0, 2.2);
278282

279283

280284
$this->applyFilter($dest_image);

0 commit comments

Comments
 (0)