system/Images/Handlers/ImageMagickHandler.php
protected function getResourcePath()
	{
		if (! is_null($this->resource))
		{
			return $this->resource;
		}

		$this->resource = WRITEPATH . 'cache/' . time() . '_' . bin2hex(random_bytes(10)) . '.png';

		return $this->resource;
	}
protected function getResourcePath()
	{
		if (! is_null($this->resource))
		{
			return $this->resource;
		}

		$this->resource = WRITEPATH . 'cache/' . time() . '_' . bin2hex(random_bytes(10)) . '.png';

		return $this->resource;
	}
Get Image Resource

This simply creates an image resource handle
based on the type of image being processed.
Since ImageMagick is used on the cli, we need to
ensure we have a temporary file on the server
that we can use.

To ensure we can use all features, like transparency,
during the process, we'll use a PNG as the temp file type.

@return resource|boolean
@throws \Exception