Owned pixel data for headless output. Set this record as
Emerge.Config.Headless.frames. The recipient does not need to release frames.
%Emerge.Config{
output: %Emerge.Config.Headless{
target: self(),
frames: %Emerge.Config.BinaryFrames{pixel_format: :bw1, dither: true}
},
renderer: %Emerge.Config.Renderer{api: :raster},
assets: %Emerge.Config.Assets{otp_app: :my_app}
}Fields
pixel_format—:rgba8888(default),:bgra8888,:rgb888,:gray8,:gray2or:bw1. RGBA/BGRA use four bytes per pixel; RGB uses three; Gray8 uses one. Gray2 packs four pixels per byte and BW1 packs eight, most-significant pixel first in each row. BGRA uses premultiplied alpha.bw1_polarity—:one_is_black(default) or:one_is_white. This chooses what a set bit means in BW1 output; it does not affect other formats.dither—falseby default. Settrueto improve grayscale approximation in raster BW1/Gray2 output. Other formats and GPU renderers do not support it.
Read the frame's stride rather than assuming tightly packed rows. All fields require a new viewport to change.
Summary
Types
Canonical form after nested keyword records have been expanded.
Frame pixel encoding.
Meaning of a set bit in BW1 output.
Types
@type normalized_t() :: t()
Canonical form after nested keyword records have been expanded.
@type pixel_format() :: :rgba8888 | :bgra8888 | :rgb888 | :gray8 | :gray2 | :bw1
Frame pixel encoding.
@type polarity() :: :one_is_black | :one_is_white
Meaning of a set bit in BW1 output.
@type t() :: %Emerge.Config.BinaryFrames{ bw1_polarity: polarity(), dither: boolean(), pixel_format: pixel_format() }