Other¶
The <input> and <output> tags of every module on this page additionally accept the attributes common to all analysis modules.
imagedecode¶added in 1.20
This module takes the input data as a stream of bytes encoded by the values 0 to 255. The data is decoded using the operating system's image decoding class, which should support PNG, JPEG and BMP data as a minimum. As output, the decoded image data becomes available as red (r), green (g), blue (b), alpha (a), luma and luminance channels (Rec. 709) with each value encoded in the range 0 to 1. The outputs receive one value per pixel, line-wise starting from the top. Additionally, the outputs width and height receive width and height in pixels respectively.
This module can be used to transfer image files via Bluetooth or a network interface and then decode them for further processing or display in a color map graph.
<imagedecode>
<input as="in">BUFFER</input>
<output as="width">BUFFER</output>
<output as="height">BUFFER</output>
<output as="r">BUFFER</output>
<output as="g">BUFFER</output>
<output as="b">BUFFER</output>
<output as="a">BUFFER</output>
<output as="luma">BUFFER</output>
<output as="luminance">BUFFER</output>
</imagedecode>
Inputs
as |
Count | as required |
Allowed types |
|---|---|---|---|
in |
exactly one | no | buffer |
Outputs
as |
Count | as required |
|---|---|---|
width |
optional | yes |
height |
optional | yes |
r |
optional | yes |
g |
optional | yes |
b |
optional | yes |
a |
optional | yes |
luma |
optional | yes |
luminance |
optional | yes |