![]() |
#1 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
New plugin for KF7(mobi) image compatibility ?
Just wondering whether it would be useful to write an epub-only edit or output plugin that automatically inserts all the necessary media query code into the CSS and epub html to allow separate and different image formatting for the older Kindle KF7(or mobi) devices in pixels and for Kindle KF8 devices as a % of screen width.
By automating this task, this should also help to eliminate one of the worst manual jobs out there for any indie author formatting for Kindle who has alot of ebook images in their epubs. This plugin should help maintain proper image format compatibility for both KF7 and KF8 devices for your ebooks on Kindle. Anyone interested in a plugin like this? Last edited by slowsmile; 08-04-2017 at 03:38 AM. |
![]() |
![]() |
![]() |
#2 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
ANYONE that makes eBooks would, of course, like a plugin like this. Nobody in their right mind who's doing books with dozens or hundreds of images wants to sit there and do the image coding manually.
FWIW. Hitch |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...I certainly agree with what you say, though the response has been somewhat silent otherwise. I'll try and get this plugin done anyway for those few that want it.
I'll also be upfront about this and say that I don't have an eInk to test it on. This plugin is already up and running but as I have found when testing it on the old Kindle Prevewer app and even the new Kindle Previewer 3 app -- they both have Ink displays that display KF8 images. I used the normal media queries to do this so I was somewhat p*ssed off when I saw this because this means thatI'm working blind and have no idea whether it works in real life on a KF7 device. Here's what the plugin does. This epub-only plugin will first ask you via a dialog which stylesheet you would like to contain the two media queries. After you press OK the plugin will then parse all the internal epub files and all the ebook image lines in your ebook will then be duplicated with appropriate KF8 or KF7 image entries in the normal way using the appropriate media query which will contain either 'mobionly' or 'kf8only' classes. The media queries regulate which image line is displayed by appropriately implementing 'display: none' and 'display: inline' in the relevant classes within the media query. Anyway, just have a look inside your test epub in the relevant CSS after you run this new plugin. That will tell all. And if I've done it wrong -- please let me know and I'll change it for you. All input image values should initially be in pixels(ie styled for KF7). The net result of running this plugin will be that all KF8 ebook images height and width values will be converted to % values. Whereas all KF7 ebook images will be displayed normally as height and width in pixels only(like the original input img tag line). If I do create this plugin would it be OK for you to quickly test it on one of your KF7 devices and let me know if its OK or has problems? It irks me greatly that I am unable to test this new plugin but there you go. It'll be a short while before I release this plugin. When I release it I will send you a private email on MR to let you know. Currently, I must add the dialog and finish off all the testing....yeah, I know -- please don't laugh ![]() Last edited by slowsmile; 08-06-2017 at 01:19 AM. |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Hmm, I have the previewer version 2.8 which provides an e-ink Kindle DX emulation. I was under the impression that the DX was never upgraded to handle kf8 format files, unlike the K3 kindles, which were eventually upgraded.
Assuming I'm not wrong about this, are you saying that the Kindle DX in the "old emulator" is also kf8 compatible? And if so could you work around it by using Kindleunpack to split out the kf7 part of a kindlegen-created dual-format mobi and feed it to the emulator? Albert |
![]() |
![]() |
![]() |
#5 | ||||||||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
I could SWEAR that I'd just seen a book that had px images that worked in the DX, but...hell, guys. Spoiler:
I'll have to look again. Hitch |
||||||||
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch and @st_albert...
Quote:
@st_albert...I also really don't hold anyone responsible for perhaps not knowing that KF8 % images may now be displayed on KF7s. This is a bad way to go. To my way of thinking, Hitch and the folks on this forum are all pretty knowledgeable about Kindle requirements, formatting etc. And if anyone is responsible I would say that it's probably the Kindle team for not telling anybody about this possible change(think about the non-existent Kindle LITB info for instance). For some more clarity, here are the media queries and code that my plugin inserts at the end of the main html stylesheet and in the html respectively on a normal plugin test run: Spoiler:
Everyone also seems to be assuming that the old KP and new KP 3 apps are telling the truth ie that they were both correctly emulating the KF7. Perhaps that's also a bad assumption. Perhaps its the fault of both KP's apps which may not be emulating the KF7 imaging accurately or correctly. That's why, IMHO, we will only really know the truth by testing the epub, after a plugin run, on an actual KF7 device. Last edited by slowsmile; 08-06-2017 at 07:57 PM. |
|
![]() |
![]() |
![]() |
#7 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
William: If you change your HTML to Code:
<p class="scrivener8"><img alt=" " class="mobionly" height="100px" src="../Images/Image1.jpeg" width="105px"/></p> Something is DEFINITELY hinky here. I promise you, in the real world, the KF7s are not displaying % or KF8. We were just testing something, on this, with some books we have inhouse, one with 378 images, that is moving into production this very week. Albert, are you seeing anything different than what I am seeing, vis-a-vis KF7/8? Hitch |
|
![]() |
![]() |
![]() |
#8 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...I've just sent you a barebones version of this Sigil plugin(it won't have a window dialog for selecting the css file for media query insertion) via your regular email because I can't send attachments by email on MR.
The plugin is called AddKindleMediaQueries. I have also implemented the change you wanted to the KF7 image line. My email will also contain simple instructions on how to use this plugin. I've sent you this plugin now because, judging from your comments above, it seems quite urgent. All I need to know is whether or not the smaller ebook images render correctly both on your KF7 devices(in pixels) and on KF8 devices(as a %). |
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,971
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The problem with putting in image dimensions is you are setting the image at a fixed size. You'll have no idea what the size of the screen being used is going to be. You want to set % and not px.
|
![]() |
![]() |
![]() |
#10 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
I took a dual-format mobi file (from kindlegen) just as we would submit to KDP. I split it using kindleunpack (stand-alone version, not the Calibre plugin) into a mobi7 .mobi file and a mobi8 .azw3 file, and tried each of them separately in the kindle previewer, version 2.8. the "mobi7" file looked reasonable in DX, Kindle3, and paperwhite, with roughly the same look and feel. the "mobi8" file looked good in Pw and K3 but the DX emulation had lots of problems in formatting paragraphs, page breaks, and so on. The images were displayed, but not the way we intended. So I conclude that the DX emulator cannot "cheat" and read the mobi8 file from a dual-format mobi in order to look good. Unfortunately I can't say whether the DX emulation, when reading the azw3 file, messed up in the same way as a real-workd DX would. BTW, the book in question was published in 2011, when IIRC there was no kf8 format in production yet. In the epub, the images were coded like so: Code:
<p class="center"><img alt="images/image002.jpg" src="../Images/image002.jpg" style="width:77%"/></p> All of which makes me very grateful that of the couple of hundred ebooks I've formatted since then, only 2 or 3 have had images other than the cover ![]() Albert |
|
![]() |
![]() |
![]() |
#11 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
You know I love ya, but in this instance, you know not whereof you speak. You cannot format images, in KF7, using %; it's not recognized. For images smaller than the full width of the screen, we have NO alternative but to use px. Hitch |
|
![]() |
![]() |
![]() |
#12 | ||||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
Quote:
Hitch |
||||
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,971
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
DX only does Mobi. So if you feed the previewer a KF8 and the DX emulation looks odd, it doesn't count because it cannot happen.
|
![]() |
![]() |
![]() |
#14 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
But slowsmile reported that when he used his plugin, he was seeing images, that had been sized in %, in KF8, size that way in KF7. Albert was testing the premise, using a split dual-mobi. We (Albert) was testing, to ensure that to the best of our collective knowledge, no change had been made to the DX emulator, vis-a-vis the rendering. He confirmed that. Now, we can look to the plugin, to figure out WHY the KF7 rendering is hinky. Right? Sweetie? It's troubleshooting via bracket navigation. Hitch |
|
![]() |
![]() |
![]() |
#15 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
I also think that's its worthing bearing in mind something which I mentioned earlier. I have already said that both the old KP and the newer KP 3 Kindle test apps do not display ebook KF7 images correctly.
I tested this by first running my plugin on an epub with an ebook image. Afterwards I then changed the KF8 image line entry and doubled the percentage value. I did this so I could more easily distinguish between KF7 and KF8 displays in KP and KP3. When I loaded this epub in KP and KP3 both app displays showed the larger image for all eInk emulations This means that both KP and KP 3 will display KF8 images(as a %) for all their eInk emulations. And this is completely wrong, so these Kindle apps cannot be trusted accurately to test KF7/KF8 displays. I also think that this fact may have caused some confusion. So I agree with Hitch, the only way to properly test this appears to be on an actual KF7 device. Worth remembering. Last edited by slowsmile; 08-07-2017 at 08:13 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formatos: ¿AZW, AZW3, MOBI, KF7, KF8? | Pepin33 | Amazon Kindle | 10 | 05-31-2017 02:51 PM |
plugin to paste an image file from clipboard | dhdurgee | Plugins | 23 | 02-02-2017 02:04 PM |
Calibre plugin image resources | jackie_w | Development | 10 | 10-27-2015 02:01 PM |
KF7 Image Sizing | mattmc | Kindle Formats | 15 | 08-31-2015 01:55 PM |
Using image in plugin code | Jellby | Development | 7 | 03-11-2014 10:56 PM |