Skip to content

ui::ImageDecodeOptions

Header: winui/render/Bitmap.hpp.

What Bitmap::decode()/read() should do beyond decoding.

Example:

// A 256px thumbnail of a camera photo, upright.
const ui::Bitmap thumb = ui::Bitmap::read("IMG_0042.jpg", {.max_width = 256, .max_height = 256});

Field Type Default
max_width int 0 The largest the result may be, aspect ratio kept; zero leaves that axis unconstrained. A picture already inside the bounds is never enlarged. The bounds apply to the upright picture, so a portrait photo stored sideways fits the same box as one stored upright.
max_height int 0 See max_width.
apply_orientation bool true Turn the pixels upright per the file's EXIF orientation.