Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1b514c8

Browse files
checking if webp is detected correctly
1 parent 33fab28 commit 1b514c8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

‎lib/ImageResize.php‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ public function __construct($filename)
159159

160160
case IMAGETYPE_WEBP:
161161
$this->source_image = imagecreatefromwebp($filename);
162-
$this->original_w = imagesx($this->source_image);
163-
$this->original_h = imagesy($this->source_image);
164-
165162
break;
166163

167164
case IMAGETYPE_AVIF:
@@ -171,9 +168,6 @@ public function __construct($filename)
171168
break;
172169

173170
case IMAGETYPE_BMP:
174-
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
175-
throw new ImageResizeException('For bmp support PHP >= 7.2.0 is required');
176-
}
177171
$this->source_image = imagecreatefrombmp($filename);
178172
break;
179173

@@ -323,10 +317,6 @@ public function save($filename, $image_type = null, $quality = null, $permission
323317
break;
324318

325319
case IMAGETYPE_BMP:
326-
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
327-
throw new ImageResizeException('For WebP support PHP >= 7.2.0 is required');
328-
}
329-
330320
if(!empty($exact_size) && is_array($exact_size)) {
331321
$dest_image = imagecreatetruecolor($exact_size[0], $exact_size[1]);
332322
$background = imagecolorallocate($dest_image, 255, 255, 255);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /