View Single Post
Old 02-25-2014, 08:21 AM   #677
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by tkeo View Post
I wrote "linear=No" on purpose. I thought it should be set to "No" for a cover page; from a few references:
http://blog.threepress.org/2009/11/2...-cover-images/
https://wiki.mobileread.com/wiki/Ebook_Covers
But, I am not confident so much.
Yours is probably the best approach for source/epubs that are going to be edited and then run right back through kindlegen. That's what Amazon suggests, actually--to get around their no cover-page "rule" with epubs as the source. For those who may be using KindleUnpack simply to get a clean(er) epub from a KF8, that may not be in their best interest. But it can be easily changed in an editor in that case, too.

I would stick with your approach, though. I asked mainly because I couldn't find where that string was created, at first glance.

Quote:
I thought it needs an extra library like PIL. To avoid using the extra library, I wrote that style.
I thought the same thing (PIL)! Then a search turned up that particular method. I guess in a perfect world, I'd like to see the dimensions stored in the same dictionary as the image names when the image data is first extracted--so there'd be no need to re-read that file in the cover-page creation routines--but that's for a future rainy day.

Of course, I quickly cobbled that together--I suspect it might break easily. Probably needs to be some basic error-handling to make it die a little more gracefully if that happens.
DiapDealer is offline   Reply With Quote