src/mako/pixl/processors/GD.php
protected function createImageResource($image, $imageInfo)
	{
		switch($imageInfo[2])
		{
			case IMAGETYPE_JPEG:
				return imagecreatefromjpeg($image);
				break;
			case IMAGETYPE_GIF:
				return imagecreatefromgif($image);
				break;
			case IMAGETYPE_PNG:
				return imagecreatefrompng($image);
				break;
			default:
				throw new RuntimeException(vsprintf('Unable to open [ %s ]. Unsupported image type.', [pathinfo($image, PATHINFO_EXTENSION)]));
		}
	}
protected function createImageResource($image, $imageInfo)
	{
		switch($imageInfo[2])
		{
			case IMAGETYPE_JPEG:
				return imagecreatefromjpeg($image);
				break;
			case IMAGETYPE_GIF:
				return imagecreatefromgif($image);
				break;
			case IMAGETYPE_PNG:
				return imagecreatefrompng($image);
				break;
			default:
				throw new RuntimeException(vsprintf('Unable to open [ %s ]. Unsupported image type.', [pathinfo($image, PATHINFO_EXTENSION)]));
		}
	}
protected function createImageResource ( $ image , $ imageInfo ) { switch ( $ imageInfo [ 2 ] ) { case IMAGETYPE_JPEG : return imagecreatefromjpeg ( $ image ) ; break ; case IMAGETYPE_GIF : return imagecreatefromgif ( $ image ) ; break ; case IMAGETYPE_PNG : return imagecreatefrompng ( $ image ) ; break ; default : throw new RuntimeException ( vsprintf ( 'Unable to open [ %s ]. Unsupported image type.' , [ pathinfo ( $ image , PATHINFO_EXTENSION ) ] ) ) ; } }
Creates an image resource that we can work with.

@param  string            $image     Path to image file
@param  array             $imageInfo Image info
@throws \RuntimeException
@return resource
Creates an image resource that we can work with .