If you want to be able to do the opposite (output your gmagick object to a blob), then use getImageBlob() like this:
$outputstring = $im->getImageBlob();
This is apparently undocumented here, but since the entire library is ported/modeled on the imagemagick library, it makes sense that it uses the same name as imagemagick.
Gmagick::readimageblob
(PECL gmagick >= Unknown)
Gmagick::readimageblob — خواندن تصویر از رشته دودویی
Description
public void Gmagick::readimageblob
( string $imageContents
[, string $filename
] )
خواندن تصویر از رشته دودویی.
Parameters
- imageContents
-
محتوای تصویر
- filename
-
filename تصویر.
Return Values
شی Gmagick در صورت موفقیت
Errors/Exceptions
Throws an GmagickException on error.
MPLong ¶
2 years ago
