JBZoo\Image\Image::loadString PHP Method

loadString() public method

Load an image
public loadString ( string $imageString, boolean | null $strict = false )
$imageString string Binary images
$strict boolean | null
    public function loadString($imageString, $strict = false)
    {
        if (!$imageString) {
            throw new Exception('Image string is empty!');
        }
        $this->cleanup();
        $this->_loadMeta($imageString, $strict);
        return $this;
    }

Usage Example

Ejemplo n.º 1
0
 public function testPHP53_getimagesizefromstring()
 {
     try {
         $img = new Image();
         $img->loadString('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
     } catch (Exception $e) {
         isTrue(strpos(PHP_VERSION, '5.3') === 0);
     }
 }
All Usage Examples Of JBZoo\Image\Image::loadString