Image

Source file: prog/engine/image/decodeFnameSuffix.h

Image Rasterization

Images can be of several formats, most common TIFF, PNG, JPG and SVG.

There can also be suffixes that allow to specify parameters of rasterization, separated with ::

<image>[<:W>[:H][:k|f|p]]

W - width
H - height
K - keep aspect
F - force aspect
P - premultiplied alpha

Width and Height can be used for svg and other format for better down/upsampling quality. When both Width and Height are 0 then resampling is skipped (it may be useful to force premultiplied alpha leaving source picture resolution as is using :0:P suffix). For vector graphics (such as .SVG) resolution (at least Width) is mandatory.

Sample usage (in daRg for example):

Picture("image.svg:256:256:K:P")
or
Picture("b64://<base64 encoded string of svg or png>:256:256:K:P")
or
Picture("image.png:0:P")
or
Picture("image.png:512:256:P:F")