Mobileread
Mobipocket reader blowing up the image
#1  Oliva 10-25-2019, 07:32 PM
Hello,
English is not my first language, so sorry if I sound weird. I am trying to learn to make a mobi file with the help of Jutoh. I don't know any coding yet, but would like to use media queries to tweak the image sizing for kf7 and kf8. As Jutoh does not allow tweaking the code directly (and apparently has no solution for image sizing for kf7) I figured out this convoluted workflow:

1. compiling a .mobi in Jutoh, omitting any image size specification
2. importing this mobi to Sigil with the Kindleimport plugin
3. using the Sigil plugin AddKindleMediaQueries
4. specifying in Sigil the size of the image both for KF7 and KF8 -- and saving as the final .epub
5. converting this epub to mobi with Kindlegen
6. testing how kf7 and kf8 behave (here I use Calibre's KindleUnpack, then check each kindle version. And I also use the ancient Mobipocketreader app on my computer).

I was thrilled to find out that Calibre showed both kf7 and kf8 obeying the media query size specifications. BUT Mobipocketreader (kf7) didn't. It showed the image at 100% width instead of the specified 100px as it should.

Does anybody have an idea why this is?
Reply 

#2  slowsmile 10-26-2019, 01:29 AM
I don't think you should be using Mobipocketreader for your KF7 testing -- I think the MPR company went defunct and disappeared several years ago so the MPR code hasn't been maintained for a while.

I wrote the AddKindleMediaQueries plugin and when I tested the original plugin it worked fine on both KF8 and KF7(mobi) devices. I think the only way you can accurately test the outcome of my plugin on KF7 is to side-load the mobi file onto an actual KF7 device like an old Kindle eInk.
Reply 

#3  Oliva 10-26-2019, 12:04 PM
Quote slowsmile
I don't think you should be using Mobipocketreader for your KF7 testing -- I think the MPR company went defunct and disappeared several years ago so the MPR code hasn't been maintained for a while.

I wrote the AddKindleMediaQueries plugin and when I tested the original plugin it worked fine on both KF8 and KF7(mobi) devices. I think the only way you can accurately test the outcome of my plugin on KF7 is to side-load the mobi file onto an actual KF7 device like an old Kindle eInk.
Yes, I know, but unfortunately I don't have an old kf7 device.

Your wonderful plugin really helps a lot. Thank you so much for creating it and making it available.
Reply 

#4  slowsmile 10-27-2019, 05:44 AM
Thanks for that -- I'm glad that you like the plugin.

Something else which might help your understanding. Generally, for KF8 only, images will be formatted as a percentage of screen width which is a relative value. That's to say that the actual image height/width pixel values will be expressed as a percentage of the current screen width. However, KF7 always uses absolute pixel values -- that's the actual pixel values. So if all your ebook images are already too large on KF7 devices then they will also be too large after conversion with my plugin. You need to properly adjust the individual h/w pixel values of all your images before inserting them into your ebook for KF7 devices.
Reply 

#5  Oliva 10-27-2019, 02:38 PM
Aha, I see. So images for kf7 use their original resolution PLUS their intended displayed size needs to be expressed in pixels.

But is it possible then to use the same image, which is appropriately physically resized for 600x800 displays (kf7) and, through media queries, also given a relative % width for much higher resolution displays? It would probably get blurry on those high-resolution devices.

I read on this forum that they could be restricted if they are put in a table (say, a one-cell table) and then having the cell width expressed in an absolute value.
Reply 

#6  Notjohn 10-30-2019, 11:29 AM
I only have a very few images that are not intended to be full width. The exceptions are my publisher colophon and, in the case of one book, a hand-drawn sunburst that breaks the book into sections of varying length. So in those cases only, I size the uploaded image so that it cannot expand to unreasonable size in a KF7 device. In the case of the colophon, that's 100 pixels square. I don't remember the size of the sunburst, but it was smaller.

That being the case, I've never had occasion to use media queries (or tables or any such workaround).

It's nice of Amazon to support ten-year-old devices, but their users should not be surprised that they don't render books as nicely as current Kindles or Fire tablets.
Reply 

#7  Hitch 11-03-2019, 01:53 AM
Quote Oliva
Aha, I see. So images for kf7 use their original resolution PLUS their intended displayed size needs to be expressed in pixels.

But is it possible then to use the same image, which is appropriately physically resized for 600x800 displays (kf7) and, through media queries, also given a relative % width for much higher resolution displays? It would probably get blurry on those high-resolution devices.

I read on this forum that they could be restricted if they are put in a table (say, a one-cell table) and then having the cell width expressed in an absolute value.
Well, if you're using images that are 600x800px, yes, they will absolutely be blurry on larger/better devices. I would recommend adding at least 400px to each dimension.

You might want to rummage around and see if you can find a copy of the older Kindle Previewer to use. The DX setting in that worked GREAT for KF7 emulation.

The Mobipocket company sold MBPC to Amazon and as far as I know, everything else that they had, too.

Hitch
Reply 

Today's Posts | Search this Thread | Login | Register