Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-04-2008, 06:47 PM   #1
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,345
Karma: 90778786
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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
pdurrant is online now   Reply With Quote
Old 10-04-2008, 07:14 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,435
Karma: 5383257
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
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 10-05-2008, 04:33 AM   #3
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,345
Karma: 90778786
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
"Oh Bother!" said Pooh.

Quote:
Originally Posted by kovidgoyal View Post
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
pdurrant is online now   Reply With Quote
Old 10-05-2008, 05:43 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,435
Karma: 5383257
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
kovidgoyal is offline   Reply With Quote
Old 10-05-2008, 08:35 AM   #5
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,345
Karma: 90778786
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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:

http://wiki.mobileread.com/wiki/MOBI

Thanks again.

Quote:
Originally Posted by kovidgoyal View Post
note that lrf-meta has a --get-cover switch which you can use to get the guessed cover
pdurrant is online now   Reply With Quote
Old 10-05-2008, 01:12 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,435
Karma: 5383257
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).
kovidgoyal is offline   Reply With Quote
Old 10-05-2008, 06:02 PM   #7
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,345
Karma: 90778786
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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:
Originally Posted by kovidgoyal View Post
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).
pdurrant is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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 05:19 AM
Center a cover image Crusader Sigil 2 10-18-2009 09:51 AM
Cover Image Display JoeD OpenInkpot 9 05-05-2009 01:42 AM
Changing LRF Cover Image Dave Berk Sony Reader 8 12-03-2008 10:43 PM
Adding a cover image to mobipocket files rheostaticsfan Kindle Formats 4 05-25-2008 04:40 PM


All times are GMT -4. The time now is 12:44 PM.


MobileRead.com is a privately owned, operated and funded community.