blob

Output a binary raw dump of an image in a specified format.

blob ( string|ImageType $type ): void 
Parameters
type

Image format of the dump. See Grafika\ImageType for supported formats.

Returns

No value is returned.

Examples

This will output a PNG image directly to the browser:

use Grafika/Grafika;

$image = Grafika::createImage( 'source.png' );

header('Content-type: image/png'); // Tell the browser we're sending a png image
$image->blob('PNG'); // Output raw binary png format