You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This assumes image.file_format describes the content of the file on disk/packed file. But that's wrong, image.file_format is only the format to use when saving, cf #986. The file_format check should be removed.
To avoid an unnecessary file read in the case of a file on disk, a check for the file extension could be added.
Re-encoding would be especially bad for JPEGs, since it would be lossy.
The text was updated successfully, but these errors were encountered:
scurest
changed the title
Export: images be be needlessly re-encoded in some cases
Export: images may be needlessly re-encoded in some cases
Dec 19, 2021
Look at this code for getting the already-encoded data for an image
glTF-Blender-IO/addons/io_scene_gltf2/blender/exp/gltf2_blender_image.py
Lines 192 to 200 in 3bc2858
This assumes
image.file_format
describes the content of the file on disk/packed file. But that's wrong,image.file_format
is only the format to use when saving, cf #986. The file_format check should be removed.To avoid an unnecessary file read in the case of a file on disk, a check for the file extension could be added.
Re-encoding would be especially bad for JPEGs, since it would be lossy.
The text was updated successfully, but these errors were encountered: