Avoid retaining in memory unmodified copies of images

This commit is contained in:
Giuseppe Criscione 2020-11-28 16:05:42 +01:00
parent 4723af893e
commit 080c4e1d8a

View File

@ -74,13 +74,6 @@ class Image extends File
*/
protected $image;
/**
* Unmodified image resource
*
* @var resource
*/
protected $sourceImage;
/**
* JPEG export quality (0-100)
*
@ -607,9 +600,6 @@ class Image extends File
if (is_resource($this->image)) {
imagedestroy($this->image);
}
if (is_resource($this->sourceImage)) {
imagedestroy($this->sourceImage);
}
}
/**
@ -675,7 +665,6 @@ class Image extends File
$this->width = imagesx($this->image);
$this->height = imagesy($this->image);
$this->sourceImage = $this->image;
}
/**