08-09-2017, 07:48 PM | #31 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...I'm not really sure why you have to do such complex testing.
As far as I can see, two questions need to be answered: * Does an epub image, formatted as KF8(as a percentage), display incorrectly on the old Kindle Previewer and on the new Kindle Previewer 3 eInk emulations? * Does my plugin work on actual KF7 and KF8 devices? First thing to prove is whether or not my plugin works or not and gives correct displays on actual KF7 and KF8 devices. If my plugin does work then this will make the next test much easier to prove. Test on KP and KP3 only for proper KP7 emulation using both pixel values and % values: * Run the test epub through the new plugin. * Then remove the media query files from the bottom of the appropriate stylesheet. * Remove the class declarations in from within the <img> tags on both the KF7 and KF8 image lines in the epub. Both images should be displayed on KF8. But only one image should be displayed on KF7 emulations(pixel image only) on KP and KP3. * Test all outcomes only on KP and KP3 only. If you want to vary the size of the % value, you can either do it manually in the html or you can change the base width value(fixed screen width value used in the % calculation). The base width value is inversely proportional to the % value. So if you increase the base width value to 1000 then the displayed image will be smaller. If you decrease the base width value then the displayed the image size will increase. This test will prove whether the both KP eInk emulations are correct or not for images formatted with % values. Last edited by slowsmile; 08-09-2017 at 08:38 PM. |
08-09-2017, 07:54 PM | #32 | |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Albert |
|
08-09-2017, 07:56 PM | #33 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
What the heck. If anyone else wants to test my new plugin, then here it is.
I think it will perhaps be more useful if we get as many people involved in testing this plugin as possible. All I really need to know is whether an epub (after running my Sigil plugin and converting to Kindle using kindlegen) works properly or not on actual KF7 devices and KF8 devices. Any help with this would be greatly appreciated. I've also added a README.html file to the plugin zip directory which will help to explain what the plugin does. I'll release this plugin in the proper way when I'm satisfied that the plugin works correctly on both KF7 and KF8 devices. See below for the plugin download. Last edited by slowsmile; 08-09-2017 at 09:10 PM. |
08-09-2017, 07:59 PM | #34 | |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Albert |
|
08-09-2017, 08:10 PM | #35 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@st_albert...Hitch has said that KF7 devices cannot or should not display images where the height and width values are in percentages(KF7 devices can only display images in pixels). I absolutely believe Hitch is right here -- no arguments from me about this.
What I am currently disputing is that the old Kindle Previewer and the newer Kindle Previewer 3 apps will display images formatted as percentage values for all their eInk or KF7 emulations. This is all wrong -- their eInk emulations should not display images as percentage values. Only images where the height/width are defined in pixels should be displayed on their KF7 emulations. Last edited by slowsmile; 08-09-2017 at 08:17 PM. |
08-09-2017, 08:52 PM | #36 | |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
So in the source epub, image tags were coded like this: Code:
<p class="center"><img alt="images/image002.jpg" src="../Images/image002.jpg" style="width:77%" /></p> That particular line ended up in the KF7 mobi file as: Code:
<p align="center"><img alt="images/image002.jpg" src="Images/image00015.jpeg"/></p> Additionally, note that in the KF7 code, the image itself has been renamed, though the alt= information is the same. I have no idea what that's all about; the original image from the source code seems identical to the image that ships with the mobi file. It hasn't been resized or anything. I grabbed your plugin, but I dare not start playing with it tonight, as my brain is about to reach its melting point OK, hope I've clarified what I meant by my prediction that both images will be displayed, but only the pixel-value width specification will be honored. The other one won't have any width specification at all. Vide infra. And thanks for all your-all's (meaning all the contributors to this thread -- it's Southern-speak) efforts and discussion! I'm learning much. Albert |
|
08-09-2017, 09:27 PM | #37 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
st_albert...Yes that is a strange result that you got.
But how did you split your original Kindlegen mobi into KF7 and KF8 versions? If you used Calibre to do it, then that will give you the result that you got. I also ran the test using Calibre with the same result as you. And it was very evident to me that Calibre deliberately strips out all media queries from the stylesheet. It also strips out all classes and height/width definitions from the <img> tags. The gist is that you cannot rely on Calibre to give you a correct view of your mobi or AZW file. A much better way of doing the same thing would perhaps be to run the plugin then convert your epub to mobi using Kindlegen, then download DiapDealer's KindleImport plugin(which uses KindleUnpack) and run your mobi through that in Sigil to give you an epub version. That's what I did and everything was there - including media queries and all the proper image formatting(from running the plugin) Last edited by slowsmile; 08-09-2017 at 09:56 PM. |
08-09-2017, 09:43 PM | #38 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I think--and this is NOT something I've spent a lot of time on, so this is about as good as rampant speculation--that's (renaming the images) related to the HD/non-HD images thing. That's what I think. And yes: KF7 images will, of course, display; my thing is, they just will "do their own thing," based on their original size, the size of the device and the firmware, rather than obeying any KF8-style commands. I'm kinda fragged, tonight, William, so I hope you'll forgive me if I don't get that next set of tests done. I push a lot, from Mon-Weds night (for example, been at work, since Mon. a.m., for 39 hours, as of right now), so...I'm kinda lamebrained at the moment. Hitch |
|
08-09-2017, 09:47 PM | #39 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
I'm a linux guy, where possible. I did use the stand-alone kindleunpack.py to split the dual-format mobi.
Just as a teaser, I ran a test epub, along the lines of what Hitch suggested, but very, very, bare bones, through kindlegen (command line version 2.9) and got somewhat more complicated results. I need to dig deeper into these results, but note that this was the first time I passed an epub through kindlegen that contained any pixel-dimension coding at all. The results are confusing. Stay tuned. For now, gn8 and sleep well. Albert |
08-09-2017, 10:02 PM | #40 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...Please don't get all stressed about these problems on my account. Take your time and have a restful weekend, if that's possible. I know how hard you work and can only guess at how stressful it must be for you. Perhaps gently sipping a whisky later would help...maybe one or two or three or...works wonders for me...
|
08-09-2017, 10:42 PM | #41 | ||
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
. Quote:
More on the morrow, when I've had a chance to sleep on it. Albert |
||
08-09-2017, 11:20 PM | #42 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
08-09-2017, 11:25 PM | #43 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...I've been thinking about your Voyager problem -- where any images that are defined over 50% immediately blow up to 100% for no apparent reason.
And you're probably not going to like my possible solution to the above problem. My suggestion is that you could use the !important modifier to override any funnies that are beiing caused by the Voyager's firmware. In other words the Kindle overrides on Voyager will no longer be able to change your values. You could program your Voyager image like this: Code:
<p class="image-style"><img alt="" src="../Images/image001.jpg" class="imgsize1"/></p> Code:
.imgsize1 { width: 60% !important; height: auto !important; } I know you don't like the above solution, but -- hey -- if you have no other solution then I would use it. Worth a try FWIW. Last edited by slowsmile; 08-10-2017 at 12:01 AM. |
08-09-2017, 11:39 PM | #44 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
LOL..."Shades of Bill Bixby..."...Well Hitch I guess I'm lucky because I don't turn green but if I have one over the top all that happens is that I just melt into my old rocking chair with a silly grin on my face. My Dad also taught me a thing or two - I follow his advice now which is: Never drink alone and only drink after 6:00pm in the evening. Been following that advice for 37 years. All I can say is that it works for me...
|
08-10-2017, 10:28 AM | #45 | ||
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Well, the bigger problem is, even Amazon admits it's a bug. :-) And, for those of you that didn't read this or weren't around, etc., for this discussion, here, a while back, the problem is, it wasn't just a bug with the Emulator--it was in the actual device software, too. Strewth, I haven't checked recently, to see if that's been resolved. It may well have been. The only reason I brought it up is the DX thing. I wonder, now, if the Voyage, et al issue had its roots in a heretofore undiscussed/unnoticed glitch in the DX. Ya know? I think--but can't quite recall--that we tried using that, then, when we discovered it and reported it to Amazon. But I'd be lying if I claimed to recall precisely; it's been...hell, 3 years or maybe even more? Quote:
Hitch |
||
|
Similar Threads | ||||
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 |