imagineer v0.3.3 Imagineer.Image.PNG.Pixels.NoInterlace View Source
Link to this section Summary
Functions
Encodes each row of pixels into a scanline. For no interlace, that really just means putting all of the channels for a row into a binary
Extracts the pixels from all of the unfiltered rows. Sets the pixels
field
on the image and returns it
Link to this section Functions
Encodes each row of pixels into a scanline. For no interlace, that really just means putting all of the channels for a row into a binary.
Extracts the pixels from all of the unfiltered rows. Sets the pixels
field
on the image and returns it.
Example
iex> alias Imagineer.Image.PNG
iex> image = %PNG{
...> color_format: :rgb,
...> bit_depth: 8,
...> interlace_method: 0,
...> width: 2,
...> height: 5,
...> unfiltered_rows: [
...> <<127, 138, 255, 147, 159, 106>>,
...> <<233, 1, 77, 78, 191, 144>>,
...> <<234, 78, 93, 56, 169, 42>>,
...> <<184, 162, 144, 6, 26, 96>>,
...> <<32, 206, 231, 39, 117, 76>>
...> ]
...> }
iex> PNG.Pixels.extract(image).pixels
[
[ {127, 138, 255}, {147, 159, 106} ],
[ {233, 1, 77}, {78, 191, 144} ],
[ {234, 78, 93}, {56, 169, 42} ],
[ {184, 162, 144}, {6, 26, 96} ],
[ {32, 206, 231}, {39, 117, 76} ]
]