Quote:
Originally Posted by mattmc
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.
|
The K2-->DX family of KF7 devices won't obey the size of the image. I can tell you that without testing. The fact that the image will blow up to the full size of the screen, without any constraining code, is well-established.
The K1 is a very poor testing platform, I'm sorry to tell you. If you test on the DX emulation on the Previewer, you'll have a far more reliable indicator of the vast majority of the devices than using a K1. I can't even imagine where on earth you found one these days, but...{shrug}. The display capabilities/mechanisms of the K1 are not similar to those of the k2-->etc. Without trying to sound remotely snotty, seriously, you can have a K2 in days, if you look around, or a DX, in 1-2 days if you order it from Amazon, and you'll be a lot closer to what you need, than with a first-gen Kindle.
I can absolutely tell you that the
only way to get decent image sizing on any image smaller than 100% of the width of the screen is to a) set it using % in KF8 and b) set it using pixels, inline, both height and width, in KF7. That's it. You can do it either with both inline (% and px), or with the % in CSS and the px inline; but it needs to be done.
Test it on the KP. You'll see what I mean.
Hitch