/**
* Get the image resource handle
*
* @return resource
*
* @since 3.8.0
* @throws \LogicException if an image has not been loaded into the instance
*/
public function getHandle()
{
// Make sure the resource handle is valid.
if (!$this->isLoaded()) {
throw new \LogicException('No valid image was loaded.');
}
return $this->handle;
}