Pixbuf.calculateRowstride

Calculates the rowstride that an image created with those values would have. This is useful for front-ends and backends that want to sanity check image values without needing to create them.

class Pixbuf
static
int
calculateRowstride

Parameters

colorspace GdkColorspace

Color space for image

hasAlpha bool

Whether the image should have transparency information

bitsPerSample int

Number of bits per color sample

width int

Width of image in pixels, must be > 0

height int

Height of image in pixels, must be > 0

Return Value

Type: int

the rowstride for the given values, or -1 in case of error.

Meta

Since

2.36.8