#42 Fix for Bug 773686 (Cannot save luminance bmp files)

open
nobody
None
5
2009-06-12
2009-06-12
G. Myers
No

This patch addresses the issue in Bug 773686.

Luminance BMP files are currently saved as BGR rather than straight grayscale, resulting in files that are legitimate BMPs but are 3 times larger than they need to be. This patch checks for IL_LUMINANCE format and in that case generates a BGR32 grayscale palette and leaves the data as IL_LUMINANCE format, rather than not generating a palette and converting the data to IL_BGR. I don't know that this patch necessarily covers all cases (for instance I didn't know what to do with IL_LUMINANCE_ALPHA format), but it is a big improvement for the basic concept of writing a grayscale BMPs.

Discussion

  • G. Myers
    G. Myers
    2009-06-12

    Patch for il_bmp.c to fix Bug 773686

     
    Attachments