public function createFrom($image)
    {
        $type           = pathinfo($image, PATHINFO_EXTENSION);
        $type           = ($type === 'jpg') ? 'jpeg' : $type;
        $createFrom     = 'ImageCreateFrom' . $type;

        return $createFrom($image);
    }
public function createFrom($image)
    {
        $type           = pathinfo($image, PATHINFO_EXTENSION);
        $type           = ($type === 'jpg') ? 'jpeg' : $type;
        $createFrom     = 'ImageCreateFrom' . $type;

        return $createFrom($image);
    }
public function createFrom ( $ image ) { $ type = pathinfo ( $ image , PATHINFO_EXTENSION ) ; $ type = ( $ type === 'jpg' ) ? 'jpeg' : $ type ; $ createFrom = 'ImageCreateFrom' . $ type ; return $ createFrom ( $ image ) ; }
Create image from type

@param string $image
@return mixed
Create image from type