![]() |
#1 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,858
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Cover Image in LRF files
I'm trying to find the cover image in LRF files. I haven't managed to find any really detailed info about the file format on the web.
I have managed to find that in most (version >=800) files there is a tiny thumbnail gif, and I can successfully retrieve this. But despite having looked through Calibre source, I can't find out where the cover is stored, although one ominous comment implied there wasn't a standard identifier for the cover. Can anyone help, either directly or by pointing me to a documentation source? Thanks. Paul |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,299
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
LRF doesn't have a well defined cover. calibre uses some heuristics to guess at a cover. Naturally these heuristics work best with LRF files created by calibre
![]() |
![]() |
![]() |
![]() |
#3 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,858
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,299
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
note that lrf-meta has a --get-cover switch which you can use to get the guessed cover
|
![]() |
![]() |
![]() |
#5 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,858
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
I saw the --get-cover switch when looking at Calibre's source, but trying to follow through the code to work out how to do the same in C/C++ is more than my very passing acquaintance with Python is up to in the time I have.
If you've put together some documentation of the LRF format as you've decoded it while working on Calibre, that would be very helpful. Anything similar to the documentation I added to the Mobipocket format wiki entry here: https://wiki.mobileread.com/wiki/MOBI Thanks again. |
![]() |
![]() |
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,299
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm afraid I haven't done any documentation. But the LRf format is documented here http://www.sven.de/librie/Librie/LrfFormat
And SONY released the specification of the LRS format (the XML format of which LRF is the binary version). |
![]() |
![]() |
![]() |
#7 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,858
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Thanks again. Looking at what documentation there is again, and following more links to elsewhere I think I've cobbled together something that might work for some books, and shouldn't be worse than what I have at present.
In short, I'm assuming that the object referred to in the last item in the object index table is the cover image if it's a picture subfile. Paul Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mobigen there are no more files but it adds a second front cover image | Xabache | Kindle Formats | 11 | 10-22-2010 04:19 AM |
Center a cover image | Crusader | Sigil | 2 | 10-18-2009 08:51 AM |
Cover Image Display | JoeD | OpenInkpot | 9 | 05-05-2009 12:42 AM |
Changing LRF Cover Image | Dave Berk | Sony Reader | 8 | 12-03-2008 09:43 PM |
Adding a cover image to mobipocket files | rheostaticsfan | Kindle Formats | 4 | 05-25-2008 03:40 PM |