Skip to content

Commit f2683b9

Browse files
committed
remove deprecated functions
1 parent 4ab5e08 commit f2683b9

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/ImageResize.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ public function __construct($filename)
165165
throw new ImageResizeException('Could not load image');
166166
}
167167

168-
finfo_close($finfo);
169-
170168
return $this->resize($this->getSourceWidth(), $this->getSourceHeight());
171169
}
172170

@@ -257,12 +255,12 @@ public function save($filename, $image_type = null, $quality = null, $permission
257255
$background = imagecolorallocate($dest_image, 255, 255, 255);
258256
imagefilledrectangle($dest_image, 0, 0, (int) $this->getDestWidth(), (int) $this->getDestHeight(), $background);
259257
}
260-
258+
261259
imagealphablending($dest_image, false);
262260
imagesavealpha($dest_image, true);
263-
261+
264262
break;
265-
263+
266264
case IMAGETYPE_AVIF:
267265
if( !empty($exact_size) && is_array($exact_size) ){
268266
$dest_image = imagecreatetruecolor($exact_size[0], $exact_size[1]);
@@ -273,10 +271,10 @@ public function save($filename, $image_type = null, $quality = null, $permission
273271
$background = imagecolorallocate($dest_image, 255, 255, 255);
274272
imagefilledrectangle($dest_image, 0, 0, (int) $this->getDestWidth(), (int) $this->getDestHeight(), $background);
275273
}
276-
274+
277275
imagealphablending($dest_image, false);
278276
imagesavealpha($dest_image, true);
279-
277+
280278
break;
281279

282280
case IMAGETYPE_PNG:
@@ -398,8 +396,6 @@ public function save($filename, $image_type = null, $quality = null, $permission
398396
chmod($filename, $permissions);
399397
}
400398

401-
imagedestroy($dest_image);
402-
403399
return $this;
404400
}
405401

0 commit comments

Comments
 (0)