png stride - part-cw/lambdanative GitHub Wiki

(png-stride fname)

png-stride returns the stride (bytes per pixel) of a PNG file. The options are 1 for a sole alpha channel, 3 for RGB color space, and 4 for RGBA color space.

Parameter Description
fname PNG file to obtain information from

Example

Example 1: Return image information of the panda-icon.png from uSquish.

> (define fname (string-append (system-directory) (system-pathseparator) "panda-icon.png"))
> (png-width fname)
64
> (png-height fname)
64
> (png-depth fname)
8
> (png-stride fname)
4