Bug 53268

Summary: WMFPainter doesn't paint 4-bit bitmaps
Product: Batik - Now in Jira Reporter: Trejkaz (pen name) <trejkaz>
Component: UtilitiesAssignee: Batik Developer's Mailing list <batik-dev>
Status: NEW ---    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 1.8   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.4   
Attachments: proposed patch

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.)