iConvertPalette() defines a LumFactor look-up-table of size three. For the case where the destination is IL_LUMINANCE or IL_LUMINANCE_ALPHA, then the input palette is converted via this LUT. However, for a 32-bit palette (IL_PAL_RGB32, etc.) the conversion code attempts to access a fourth LumFactor index, which is invalid. When converting an image which exercises this code I get an all zeros output, unless I compile with --enable-debug which I suppose masks the problem. I'm attaching a suggested fix which resolved the problem for me.
Log in to post a comment.