mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-18 05:58:20 +01:00
Avoid retaining in memory unmodified copies of images
This commit is contained in:
parent
4723af893e
commit
080c4e1d8a
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user