1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-10 16:04:04 +02:00

added int values for IMAGETYPE

This commit is contained in:
Oliver Vogel
2013-03-25 18:31:16 +01:00
parent 790418dad7
commit e726e7b5e6

View File

@@ -205,10 +205,12 @@ class Image
break;
case IMG_JPG:
case 2:
$this->resource = @imagecreatefromjpeg($path);
break;
case IMG_GIF:
case 1:
$this->resource = @imagecreatefromgif($path);
break;
@@ -1144,10 +1146,12 @@ class Image
switch (strtolower($type)) {
case 'gif':
case 1:
@imagegif($this->resource);
break;
case 'png':
case 3:
$quality = round($quality / 11.11111111111); // transform quality to png setting
@imagealphablending($this->resource, false);
@imagesavealpha($this->resource, true);
@@ -1157,6 +1161,7 @@ class Image
default:
case 'jpg':
case 'jpeg':
case 2:
@imagejpeg($this->resource, null, $quality);
break;
}