Quote:
Originally Posted by mattmc
Thanks for helping investigate, Hitch, and good to know it works on a K2.
Although it would be good if anyone else with a K1 could weigh in and confirm it's a bug with the device, I'm going to assume that's the case for now.
I ended up writing a script that finds all images in the book, checks their CSS to see if they're percentage-sized, and if so resizes the actual image to be that percentage of the K1's screen, in pixels (which I've read is roughly 500 or 520 wide).
So then it just is the right size for K1 & K2. My logic is that most devices are roughly that size anyway, and the ones that are smaller would be K4iOS or KDroid on phones, which (correct me if I'm wrong) the percentage CSS would work fine with, shrinking the images to the correct size. The only odd man out would be the original DX, because then you get the image stretching beyond its native size, and some pixellation--but I think I'm willing to live with that.
And, I'm only using that script for my Kindle file, so there are nicer, higher-res images for iPads and stuff like that.
|
Matt:
You mean, with the corresponding physical size set in the inline html, right? Not simply with the % set for the KF8 coding in the CSS? I want to be sure we're both saying the same thing.
For KF7, you have to manually (or using your script, whatever) set the physical display size in h/w. If you don't, the images *will* enlarge to 100% of the size of the screen. If I didn't make that clear earlier, my apologies, but I thought I had.
The K1 bug is that no matter what you do in the inline, it displays 100%. (n.b.: it's not actually a bug. The early Kindle design assumed that every image was going to be a cover, and thus--100% of the width of the screen. Offered as a piece of trivia,
ASSUMING I'm remembering this correctly. Famous last words.)
Just physically re-sizing an image to be, say, 300px wide won't cause KF7 to display it that way. You have to tell the device that the w=300. Thus, two sets of styling for EVERY image, unless it's intended to always be 100% of the width of the device, regardless.
Hitch