View Single Post
Old 08-29-2015, 05:35 PM   #10
mattmc
Connoisseur
mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.
 
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
Quote:
Originally Posted by Hitch View Post
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
Hm, no, I set the corresponding "physical" size of the file, the image file, using an image processing library in my script.

(If the css is width:50%, and the image is 750px wide compared to the 500px-wide Kindle screen, I would scale it by 0.33 so it's 250px, or 50% of the screen width.)

The actual physical pixel size of the image file seems to be the only thing that affected the display of the image on K1, based on my tests. As I said, the inline width and height attributes were being ignored.

(The only tweak to that statement is if the image is bigger than the screen--then K1 did scale it down to 100% of the screen width.)

I did leave in the % sizing in the CSS for the KF8 version, and I tested that and it looks OK on the Paperwhite and Fire.

Make sense?

-----

Do you know if K2/DX behave this way as well, perchance? You're saying you need to have inline width/height attributes, but maybe it's worth a quick test to see if these devices respect the actual size of the image file, if you have no such attributes?

That's definitely the case on the K1, so if the K2/DX are different and require the width/height attributes, that would just be frustrating. I would have to both resize the image file, and add inline sizing, to get the images displaying correctly on all KF7 readers.

Anyway, as I said, if you have time to test that out I would really appreciate it.
mattmc is offline   Reply With Quote