The libwmf bitmap reading code handles incorrectly
case, when the number of colors in the palette is set
to 0 (zero). According to the Microsoft, when this
value is set to zero, the palette contains maximum
number of colors for the bitmap's pixel width
The libwmf keeps zero as a number of colors and don't
read any palette items - instead treats the palette
items as bitmap pixels, which results to the bitmap
corruption. This bug affects e.g. using bitmap brushes.
Attached patch provides basic, quick, fix - it works
for me, but I haven't done very much tests.
Log in to post a comment.