Function re_data_ui::image::show_image_preview
source · fn show_image_preview(
render_ctx: &RenderContext,
ui: &mut Ui,
colormapped_texture: ColormappedTexture,
debug_name: &str,
desired_size: Vec2
) -> Result<Response, (Response, Error)>
Expand description
Shows preview of an image.
Displays the image at the desired size, without overshooting it, and preserving aspect ration.
Extremely small images will be stretched on their thin axis to make them visible. This does not preserve aspect ratio, but we only stretch it to a very thin size, so it is fine.
Returns error if the image could not be rendered.