【发布时间】:2012-08-03 10:58:25
【问题描述】:
我正在尝试解析移动图书,只想获取图书的一些信息,即:标题、作者和封面(如果有)。我正在关注mobi format spec。
现在,我可以正确获取标题和作者,但是当涉及到封面时,我到目前为止得到了这些信息:
-
我得到图像记录块索引:
108 0x6c 4 First Image index First record number (starting with 0) that contains an image. Image records should be sequential. 我得到从开始到图像记录的偏移量
- 我试图获取这些字段,但我没有从我的任何书籍中获取它们:
EXTH 201 4 coveroffset Add to first image field in Mobi Header to find PDB record containing the cover image <EmbeddedCover> 202 4 thumboffset Add to first image field in Mobi Header to find PDB record containing the thumbnail cover image 203 hasfakecover
所以,现在我得到了一个原始二进制块,我将它与其他 png 文件和 jpg 文件进行了比较,没有发现任何共同点。我还尝试将这个二进制块保存到 test.png 或 test.jpg,但它似乎不是真实的图像。
我该怎么办?
【问题讨论】:
标签: kindle mobipocket