CairoImageSurface::getFormat

(PECL cairo >= 0.1.0)
Get the image format
public int CairoImageSurface::getFormat ( void )

Retrieves the image format, as one of the CairoFormat defined

Returns:

One of the CairoFormat enums

Examples:
CairoImageSurface::getFormat() example
<?php

$surface = new CairoImageSurface(CairoFormat::ARGB32, 50, 50);

var_dump($surface->getFormat()); // 0

$surface2 = new CairoImageSurface(CairoFormat::A8, 50, 50);

var_dump($surface2->getFormat()); // 2

?>

The above example will output something similar to:

int(0)
int(2)
See also:

CairoImageSurface::getHeight() -

CairoImageSurface::getWidth() -

doc_php
2016-02-24 15:59:15
Comments
Leave a Comment

Please login to continue.