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

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 10-14-2012, 01:16 AM   #1
elgabo
Member
elgabo doesn't litterelgabo doesn't litter
 
Posts: 15
Karma: 150
Join Date: Oct 2009
Device: kindle 2, Kindle Touch, Kindle Paperwhite
kindle paperwhite thumbnail fix

In the post Kindle paperwhite we are discussing about thumbnail not showing on the Kindle Paperwhite because the size is too small.

Based on [Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod thread I just write this little plugging to modify the size of the thumbnail.
Code:
import os
import struct

from calibre.devices.kindle.driver import KINDLE2


class KINDLE2(KINDLE2):
    name = '%s Paperwhite thumnail FIX MOD' % KINDLE2.name.replace('/', ', ')
    author = '%s, ElGabo' % KINDLE2.author
    description = '%s Modify the thumbnail size for Paperwhite.' % KINDLE2.description
    THUMBNAIL_HEIGHT = 330

This work fine. I only worried about I don't know how just do this for the Kindle Paperwhite and not for the other kindle 2,3,4,touch.

If anybody knows please advice.

Gabo
Attached Files
File Type: zip Paperwhite thumbnail FIX.zip (342 Bytes, 3185 views)

Last edited by elgabo; 10-14-2012 at 10:04 AM. Reason: correct link
elgabo is offline   Reply With Quote
Old 10-14-2012, 11:49 AM   #2
vermontcathy
Connoisseur
vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'vermontcathy knows the difference between 'who' and 'whom'
 
Posts: 98
Karma: 10000
Join Date: Dec 2009
Location: vermont
Device: Kindle 11, PW5, Oasis
I have used some plug-ins, but not a lot. I just install this plug in, and then what? Do I need to reconvert, or no? Just sending books to the PW from Calibre will then work? Of course, I'll just try this and see.

One question - in another thread you discussed changing the aspect ratio so they are all the same height. The height doesn't bother me, and I'd prefer non-distorted covers. Does your plug-in change the aspect ratio?
vermontcathy is offline   Reply With Quote
Old 10-14-2012, 12:00 PM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by vermontcathy View Post
I have used some plug-ins, but not a lot. I just install this plug in, and then what?
This the development thread so I don't think this is an end user plugin. Kovid is away at the moment so it might take a short time before this is reviewed and possibly added to the device interface plugin.

Last edited by DoctorOhh; 10-14-2012 at 12:06 PM.
DoctorOhh is offline   Reply With Quote
Old 10-14-2012, 12:24 PM   #4
elgabo
Member
elgabo doesn't litterelgabo doesn't litter
 
Posts: 15
Karma: 150
Join Date: Oct 2009
Device: kindle 2, Kindle Touch, Kindle Paperwhite
If you don't know what you are doing the best advice is what DoctorOhh said and don't use it.

This is the development forum and not end users so code here is not intended for final use.
elgabo is offline   Reply With Quote
Old 10-14-2012, 11:16 PM   #5
Greg G
Groupie
Greg G is on a distinguished road
 
Greg G's Avatar
 
Posts: 181
Karma: 66
Join Date: Sep 2006
Location: NJ
Device: Kindle Papwerwhite
I added:

Quote:
THUMBNAIL_WIDTH = 216
to the end of the python script to force the size to be the same for all covers even if there is a slight change to aspect ratio. Looks better to me but opinions will vary. Thanks so much for figuring out how to adjust the size. More thanks to Kovid as well since he built Calibre with a framework that makes a change like this so easy!
Greg G is offline   Reply With Quote
Old 10-16-2012, 08:31 AM   #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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Before this can be added to the main calibre codebase, there needs to be some way to identify that the connected device is a PW and not say, a Touch. Unfortunately, Amazon, in its infite wisdom, decided to use the same USB ids for all the devices. IIRC, it is possible to identify the model of the kindle from the serial number, but the serial number is only available to the calibre driver system on os x and linux, not on windows, so some other technique will have to be used. Not possesing a PW, I cant come up with that...
kovidgoyal is offline   Reply With Quote
Old 10-16-2012, 10:26 AM   #7
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 2,016
Karma: 13471689
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
Quote:
Originally Posted by kovidgoyal View Post
Before this can be added to the main calibre codebase, there needs to be some way to identify that the connected device is a PW and not say, a Touch. Unfortunately, Amazon, in its infite wisdom, decided to use the same USB ids for all the devices. IIRC, it is possible to identify the model of the kindle from the serial number, but the serial number is only available to the calibre driver system on os x and linux, not on windows, so some other technique will have to be used. Not possesing a PW, I cant come up with that...
Kindle Diagnostic Tool can read the SN of a connected Kindle on Windows, for my DX at least; don't know if it'll work on a Paperwhite.

The source is available; maybe it's of some use?
mbovenka is offline   Reply With Quote
Old 10-16-2012, 10:54 AM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@kovidgoyal: It's available in the pnp_id on Windows, but I couldn't find an easy way to get to that, so I ended up running the scanner again in my Kindle Collections plugin tweaks, in order to be able extract it from there with a dumb regex.

That said, I'll look into the whole thumbnails/cover thing once I receive my PW, I have a few things in mind to check... (I'm not sure the bigger thumbnails actually hurt on older devices, for example).

Last edited by NiLuJe; 10-16-2012 at 10:56 AM.
NiLuJe is offline   Reply With Quote
Old 10-17-2012, 09:02 AM   #9
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The format of the PNP ID is windows version dependent and usbms driver version dependent. IIRC the XP pnp id does not include serial number.
kovidgoyal is offline   Reply With Quote
Old 10-17-2012, 09:31 AM   #10
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@kovidgoyal: I was afraid of that... Thanks for the confirmation .
NiLuJe is offline   Reply With Quote
Old 10-17-2012, 05:53 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Okay, finally tested this a bit more.

First, a few observations:

* On a Touch 5.1.0, Amazon downloads thumbnails with a max height of 262, not 180. (Which might explain why the Cover View was already broken on the Touch with covers sideloaded from Calibre).
* On a PaperWhite 5.2.0, they have a max height of 330px.
* The thumbnails embedded in the mobi/kf8 file are still 180x240 (max), even when delivered to a PW, so, no need to change anything there.
* Indeed, when in Cover View, the Touch & the PW will discard the thumbnail if it's too small (I didn't bother checking px/px what the minimum height is, though).

* On a slightly unrelated note, no issue with the 'Personnal doc' banner. It only pops up if there's no exth 113 set. The PW is still friendly with our custom uuid .

Now, the good news: the Touch (again, 5.1.0) doesn't choke on x330px thumbnails sideloaded by Calibre. AFAIK, the Touch & the PW are the only models that rely on these, so I see no harm in bumping this to 330 in the default plugin . (The only downside is potentially suffering from a somewhat crappy downscaling of the cover in the longpress popup, but then it's already not that great with thumbs downloaded by Amazon, so...)

That's what I ended up doing with this tiny patch.

EDIT: Remove deprecated attachment. Merged in 0.9.3 .

Last edited by NiLuJe; 10-21-2012 at 06:23 PM.
NiLuJe is offline   Reply With Quote
Old 10-17-2012, 10:59 PM   #12
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Merged.
kovidgoyal is offline   Reply With Quote
Old 10-19-2012, 11:47 AM   #13
Greg G
Groupie
Greg G is on a distinguished road
 
Greg G's Avatar
 
Posts: 181
Karma: 66
Join Date: Sep 2006
Location: NJ
Device: Kindle Papwerwhite
Would it make sense to add the height and width to the device options vice hard coding it? Some may prefer to set height 262 for their touches. Also, my preference is to set both height and width so the covers are all the same aspect ratio. Understand that I can just keep a plugin loaded to override the width so not a huge deal but thinking ahead in case they mess with cover size again in the future.
Greg G is offline   Reply With Quote
Old 10-19-2012, 11:50 AM   #14
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not something I am motivated to implement, but patches are welcome, a similar option exists for the sony driver, that can be used as a model.
kovidgoyal is offline   Reply With Quote
Old 12-28-2012, 02:42 AM   #15
centhena
Enthusiast
centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.centhena can successfully navigate the Paris bus system.
 
centhena's Avatar
 
Posts: 43
Karma: 36968
Join Date: Jul 2010
Device: Kindle 3, Kindle Paperwhite
Quote:
Originally Posted by NiLuJe View Post
* Indeed, when in Cover View, the Touch & the PW will discard the thumbnail if it's too small (I didn't bother checking px/px what the minimum height is, though).
Some of my covers aren't showing up in Cover View. Could this be why? I've reconverted all of my mobi files to get rid of the [PDOC] so there's no more "Personal" label, but some of my covers just aren't working. Should I just resize or grab differently sized cover images? I'm unsure of what size I'd be needing for the PaperWhite cover images. I've been digging through the posts that came up in search but I haven't really found anything that both made sense at my level of understanding and was relevant. Could this be my problem and if so could you point me in the right direction to try and fix it? Thanks! :o)
centhena is offline   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
Amazon launches Kindle Paperwhite and Kindle Lending Library in Europe HarryT News 18 10-13-2012 10:24 AM
Mobi thumbnail on Kindle PC/Mac app mo79 Kindle Formats 7 08-04-2012 07:02 PM
Kindle Touch: Syncing via email, updating thumbnail via USB? bouvin Devices 2 05-29-2012 08:32 AM
Since 0.8.50: No thumbnail covers on Kindle Touch bouvin Calibre 0 05-08-2012 03:11 PM
Kindle Touch has thumbnail cover images tomsem Amazon Kindle 9 12-14-2011 12:22 PM


All times are GMT -4. The time now is 01:18 AM.


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