开发者

Algorithm of naming embedded Pictures in OpenOffice

开发者 https://www.devze.com 2022-12-19 09:49 出处:网络
I need to embed images inside OpenOffice Text documents without the help of OpenOffice itself. Fo开发者_如何转开发r that I need to work directly inside the zip archive and modify the appropriate xml f

I need to embed images inside OpenOffice Text documents without the help of OpenOffice itself. Fo开发者_如何转开发r that I need to work directly inside the zip archive and modify the appropriate xml files. The problem I have now is that OpenOffice stores embedded pictures inside a picture folder and asigns a unique name to them according to the information in the picture.

Filenames look as following:

10000000000000FF000000D84ABBAECB.jpg

This filename is divided into 4 parts at 8 Byte per part and ending with the file extension.

10000000 000000FF 000000D8 4ABBAECB
^        ^        ^        ^
unknown  height   width    checksum

My problem now is that I have no clue what kind of checksum algorithm is used.


A quick check of the specification reveals no special rules for naming embedded pictures. I guess you can name them however you like (within sensible boundaries).


You cat set your own file names by adding the routes to the content.xml and manifest.xml files (META-INF/manifest.xml).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号