]> git.tdb.fi Git - libs/gl.git/commitdiff
Use R8 format when extracting a single channel from an image
authorMikko Rasa <tdb@tdb.fi>
Fri, 11 Mar 2022 21:42:57 +0000 (23:42 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 11 Mar 2022 21:42:57 +0000 (23:42 +0200)
blender/io_mspgl/export_texture.py

index 2860d461d8874efd708b3e424332dbd42aaf2da3..8e107a718a3644dba03ffc13393c587470c95f97 100644 (file)
@@ -67,7 +67,7 @@ class TextureExporter:
                        if len(channels)==4:
                                fmt = 'SRGB8_ALPHA8' if colorspace=='sRGB' else 'RGBA8'
                        elif len(channels)==1:
-                               fmt = 'LUMINANCE8'
+                               fmt = 'LUMINANCE8' if channels[0]=='Y' else 'R8'
                        else:
                                fmt = 'SRGB8' if colorspace=='sRGB' else 'RGB8'