mirror of
https://github.com/Intervention/image.git
synced 2025-08-13 09:24:05 +02:00
added int values for IMAGETYPE
This commit is contained in:
@@ -205,10 +205,12 @@ class Image
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IMG_JPG:
|
case IMG_JPG:
|
||||||
|
case 2:
|
||||||
$this->resource = @imagecreatefromjpeg($path);
|
$this->resource = @imagecreatefromjpeg($path);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IMG_GIF:
|
case IMG_GIF:
|
||||||
|
case 1:
|
||||||
$this->resource = @imagecreatefromgif($path);
|
$this->resource = @imagecreatefromgif($path);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1144,10 +1146,12 @@ class Image
|
|||||||
|
|
||||||
switch (strtolower($type)) {
|
switch (strtolower($type)) {
|
||||||
case 'gif':
|
case 'gif':
|
||||||
|
case 1:
|
||||||
@imagegif($this->resource);
|
@imagegif($this->resource);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'png':
|
case 'png':
|
||||||
|
case 3:
|
||||||
$quality = round($quality / 11.11111111111); // transform quality to png setting
|
$quality = round($quality / 11.11111111111); // transform quality to png setting
|
||||||
@imagealphablending($this->resource, false);
|
@imagealphablending($this->resource, false);
|
||||||
@imagesavealpha($this->resource, true);
|
@imagesavealpha($this->resource, true);
|
||||||
@@ -1157,6 +1161,7 @@ class Image
|
|||||||
default:
|
default:
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
case 'jpeg':
|
case 'jpeg':
|
||||||
|
case 2:
|
||||||
@imagejpeg($this->resource, null, $quality);
|
@imagejpeg($this->resource, null, $quality);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user