Page MenuHome

Fix T86210: No preview icons for non-8bit images
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Mar 3 2021, 12:47 PM.

Details

Summary

It looks like we never generated correct icon previews for images with
float_rects (non-8bit-images). Images from the report were 16bit pngs.

In this case, icon_preview_startjob would return early (it only
checked if the ImBuf rect was NULL -- which is the case if it has a
rect_float instead). This is not neccessary since icon_copy_rect is
perfectly capable of taking float rects.

Now correct the check and only return early if both rect & rect_float
are NULL.

note: this will not refresh icon previews from existing files
automatically. For this, use File > Data Previews > Clear Data-Block Previews.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Mar 3 2021, 12:47 PM
Philipp Oeser (lichtwerk) created this revision.

Didn't test, but icon_copy_rect() indeed seems capable of handling 16-bit buffers.

This revision is now accepted and ready to land.Mar 8 2021, 11:50 AM