I figured out the checksum:)
2014-05-29 10:37 GMT+08:00 Bing Ran <bing....@gmail.com>: > Thanks Andi! I'm working towards that direction. > > I'm wondering how the checksum is calculated. That's the last two bytes in > the header... > > Thanks for helping! > > Bing > > > > > > 2014-05-29 4:04 GMT+08:00 Andreas Beeker <andreas.bee...@gmx.de>: > > Hi Bing, >> >> the wmf code is in a branch, because I'd like to commit (save) it without >> interfering with the trunk ... and it's still far from being finished. >> Not sure, how the github synchronisation works, but I guess "it" only >> fetches the trunk. >> >> And for the header: I couldn't find the reference on a quick search, but >> - I think - the wmf pictures are >> always saved without the placeable header. At least when I've >> implemented/tested the wmf code in HssfWorkbook.addPicture, it only worked, >> when I've removed that header - maybe it's different with hwpf ... >> So I guess JWord is simply making a header up - either it uses standard >> values for the bounding box or it reads one of the window records [1]. >> >> Anyways, I would simply try to append the 22 bytes of a working picture >> to the pictures with the missing magic code 0x9AC6CDD7 (little endian) and >> see if your post-processing is ok with that. >> >> Andi >> >> >> [1] http://svn.apache.org/repos/asf/poi/branches/wmf_render/ >> src/scratchpad/src/org/apache/poi/hwmf/record/WmfWindowing.java >> >> >> On 28.05.2014 18:34, Bing Ran wrote: >> >>> Hi Andreas, >>> >>> Thanks for answer. >>> >>> The raw data was acquired from overriding the >>> AbstractWordConverter.processingImage()... >>> in the hwpf package, by calling picture.getContent(). I cannot >>> immediately figure >>> out how to reset the header after reading your code reference. >>> >>> BTW, I was using a local compile of the POI modules from Github. Is the >>> code considered out of date? I could not find the hwmf package in the >>> github code. >>> >>> Thanks >>> >>> Bing >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org >> For additional commands, e-mail: user-h...@poi.apache.org >> >> >