private function loadImageFromString($imagestring)
    {
        if (Utils::isJPGResource($imagestring)) {
            $this->extension = 'jpg';
            $this->type = IMAGETYPE_JPEG;
        }

        if (Utils::isPNGResource($imagestring)) {
            $this->extension = 'png';
            $this->type = IMAGETYPE_PNG;
        }

        $this->from = 'imagestring';
        $this->resource = imagecreatefromstring($imagestring);
        $this->width = $this->boxWidth = imagesx($this->resource);
        $this->height = $this->boxHeight = imagesy($this->resource);
    }
private function loadImageFromString($imagestring)
    {
        if (Utils::isJPGResource($imagestring)) {
            $this->extension = 'jpg';
            $this->type = IMAGETYPE_JPEG;
        }

        if (Utils::isPNGResource($imagestring)) {
            $this->extension = 'png';
            $this->type = IMAGETYPE_PNG;
        }

        $this->from = 'imagestring';
        $this->resource = imagecreatefromstring($imagestring);
        $this->width = $this->boxWidth = imagesx($this->resource);
        $this->height = $this->boxHeight = imagesy($this->resource);
    }
private function loadImageFromString ( $ imagestring ) { if ( Utils :: isJPGResource ( $ imagestring ) ) { $ this -> extension = 'jpg' ; $ this -> type = IMAGETYPE_JPEG ; } if ( Utils :: isPNGResource ( $ imagestring ) ) { $ this -> extension = 'png' ; $ this -> type = IMAGETYPE_PNG ; } $ this -> from = 'imagestring' ; $ this -> resource = imagecreatefromstring ( $ imagestring ) ; $ this -> width = $ this -> boxWidth = imagesx ( $ this -> resource ) ; $ this -> height = $ this -> boxHeight = imagesy ( $ this -> resource ) ; }
Load an image from image string.

@param  string $imagestring Image string
@return void
Load an image from image string .