imagineer v0.3.3 Imagineer.Image.PNG.Helpers View Source

Link to this section Summary

Functions

Given a color format and bit depth, tells us how many bytes are needed to store a pixel

Given a color format, bit depth, and the width of an image, tells us how many bytes are are present per scanline (a row of pixels)

Returns the number of channels for a given color_format. For example, :rgb and :rbg16 have 3 channels: one for Red, Green, and Blue. :rgb_alpha and :rgb_alpha each have 4 channels: one for Red, Green, Blue, and the alpha (transparency) channel

Given a PNG’s color type, returns its color format

Returns a binary consisting of length null (<<0>>) bytes

Link to this section Functions

Link to this function bytes_per_pixel(atom, int) View Source

Given a color format and bit depth, tells us how many bytes are needed to store a pixel

Link to this function bytes_per_row(atom, int, width) View Source

Given a color format, bit depth, and the width of an image, tells us how many bytes are are present per scanline (a row of pixels).

Link to this function channels_per_pixel(atom) View Source

Returns the number of channels for a given color_format. For example, :rgb and :rbg16 have 3 channels: one for Red, Green, and Blue. :rgb_alpha and :rgb_alpha each have 4 channels: one for Red, Green, Blue, and the alpha (transparency) channel.

Given a PNG’s color type, returns its color format

Returns a binary consisting of length null (<<0>>) bytes