Bug 53268 - WMFPainter doesn't paint 4-bit bitmaps
Summary: WMFPainter doesn't paint 4-bit bitmaps
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: Utilities (show other bugs)
Version: 1.8
Hardware: PC Mac OS X 10.4
: P2 normal
Target Milestone: ---
Assignee: Batik Developer's Mailing list
Keywords: PatchAvailable
Depends on:
Reported: 2012-05-21 23:18 UTC by Trejkaz (pen name)
Modified: 2012-05-21 23:23 UTC (History)
0 users

proposed patch (2.19 KB, patch)
2012-05-21 23:22 UTC, Trejkaz (pen name)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trejkaz (pen name) 2012-05-21 23:18:34 UTC
We were sent a WMF image which Batik's WMF painter paints as all black. It turns out it was a trivial WMF with just a single 4-bit bitmap in it. Batik doesn't support 4-bit bitmaps yet, but interestingly did not throw an error for the unsupported image either.
Comment 1 Trejkaz (pen name) 2012-05-21 23:22:25 UTC
Created attachment 28811 [details]
proposed patch

Something I hacked together which works for the only sample we have been sent.
Should be checked carefully. I think the padding maths is right (I checked for the example we got, and at the end of the loop, the offset is exactly equal to the length of the bit array.)