08-07-2017, 07:47 PM | #16 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
08-08-2017, 12:46 PM | #17 | |
Guru
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p> Also, though I claimed that the mobi7 file had the same "look and feel" in all of the e-ink emulators, that wasn't precisely true. There were variations in the font sizes relative to the image sizes, and possibly other small variations. They were still readable however. Albert who has now concluded" "Mobi7 delenda est." |
|
Advert | |
|
08-08-2017, 04:35 PM | #18 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
The KF7 ignores, and always has, any % settings for image sizes. The coding you are reporting is what I'd expect to see, sans any media queries or fallback styling on the HTML tags. Vis-a-vis Delenda Est...well, by the sheer virtue of time, it shall. I, for one, am glad that Amazon doesn't throw its customers under the bus. Yes, yes, it makes my life harder, but so what? I'd hate it if Amazon turned into Apple, tossing OSes and hardware, etc., aside, like so much bits, orts and detritus from the dining table. I hate that. Warning: AppleHate Rant: Spoiler:
So: as soon as I can catch my breath, hopefully tonight (ran out of consciousness, last night), I'm going to test William's plugin. Albert? Are you crazy busy, hmmmm???? Hitch |
|
08-08-2017, 05:31 PM | #19 | |
Resident Curmudgeon
Posts: 73,654
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
08-08-2017, 05:42 PM | #20 |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
Advert | |
|
08-08-2017, 06:55 PM | #21 |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Back on topic, the plugin
Hi:
I can, very quickly, report that there's something hinky, but I don't know the genesis yet. So far, the plugin seems to work well. I can report that something is hinky with the KF7 DX emulation. Now...this may be something *like* the problem that affected the Voyage--where if you have an image that is > 50% of the width of the screen, but smaller than 100%, it will blow it up to full-width. I tested an ePUB that I had handy. It had a few smaller images (a line and a copy of the Presidential seal) and then two that were larger. The plugin calculated the two larger images at 797px w, and 444px tall. (I confess a bit of whatever about this--the original image was 827x455, but, hey.) On the Emulation, the Great Seal (set to display at 300px wide; original image is the same size, unlike the other, above), displays at what I believe it should. Ditto on the K2 Actual. All groovy. But the larger images--the 797s--displayed at 100% of the width of the DX, which is wrong. The DX has a width of 824, and although 797 is close, it's not 100% of the width. Now, I can't tell you anything about the K2, because, (like a bloody idiot), it of course displayed full-width there, b/c the K2 is only 600px wide. DUH. I think that maybe the DX has that (originally) Voyage image glitch. I'm going to have to make up an ePUB, that has gradually-increasing images, one per page, maybe, and test it. Or a sliding scale. Otherwise, given the limitation of the 600px on the K2, I'm going to be chasing my tail for a while. Coincidentally, the presidential seal image is half of the size--50%--of the K2 screen, so...it works. Of course, because...half. In summation:
That's all I know thus far. Oh, William: nice plugin. Hitch |
08-08-2017, 08:40 PM | #22 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Double entry
Last edited by slowsmile; 08-08-2017 at 08:44 PM. |
08-08-2017, 08:42 PM | #23 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@st_albert...You said that this code, containing % width:
Code:
<p class="center"><img alt="images/image002.jpg" src="../Images/image002.jpg" style="width:77%"/></p> Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p> I also know that your second example(with no image dimensions) is exactly how Jutoh codes Kindle ebooks for mobi. This is highly relevant to our discussion and I'm sorry to have missed it earlier. So does that mean that all you have to do for Kindle is just ensure that you code all ebook image widths as a % value for both KF8s and KF7 devices and they will display correctly? Therefore is there any real need for a new plugin? I wish I had a KF7 device to test out this theory... |
08-08-2017, 09:29 PM | #24 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Willaim: No. That's not what works. PLEASE believe me when I tell you, if you don't code a physical size for KF7, it will display the image blown up to as near the full-size of the screen as it can. Using % for KF7 *does* *not* *work.* I don't know what Julian is thinking--possibly, like so many others, that it's more work to do KF7, so he's just ignoring it--but it does not work. I just tested it, on a KF7. Hitch |
|
08-08-2017, 10:23 PM | #25 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...I was hoping that you would you would come in and confirm or deny the above. And I certainly believe your answer -- no reason not to because you should know. I was just worried about doing all this work for newt.
|
08-08-2017, 10:50 PM | #26 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
08-09-2017, 10:11 AM | #27 | |
Guru
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
No, as far as I know, kindlegen (probably version 1.x?) just ignored the width:"70%". This was published in mid-2011, about 3 months before Amazon introduced KF8 to the public. At that time, I didn't realize that image dimensions had to be in pixels, so I didn't understand why it wasn't working, only that it didn't work as expected at first. What I ended up doing (I think -- my notes are a little vague) was to manually resize each individual image to an appropriate width, determined by trial-and-error using an actual Kindle 3 (which at that time, of course was a KF7 device.) Thus, a jpeg with a width of 360 px would give an equivalent to width:"60%" on the K3's 600x800 screen. In my case, the K3 didn't blow up the images to full screen. So, no, looks like you have to end up with image sizes in pixels in the epub you run through kindlegen. Perhaps your plugin could convert % to px, based on a standard (perhaps user-definable) screen width in pixels? Albert |
|
08-09-2017, 12:53 PM | #28 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
That's what the plugin is doing--it's putting in two image calls, one for KF8, one for KF7, each hidden from the other for display, and it sizes the KF8 in % and the KF7 in px. The only remaining ponderment, right now, is testing the DX emulator against the device, to find out if the DX has a display glitch, possibly like the Voyage, above 50%. (Plus, Bill/William/Slowsmile has had some weird thing...he's seeing something displaying, in KF7, as though it were KF8 % coded, which we know is not possible, so perhaps we can figure out why he's seeing that or what he's seeing, or..?) I plan to take a test ePUB, and make various sizes of the same image, then build the MOBI. I'm still thinking about the optimal physical size of the iamge to test, but I thought I'd do something like this: Image (orig. size, say...IDK, 1000px wide?) KF8-10% KF7--a calculated 10% in px. (I obviously won't be using hidden, b/c that isn't the point of the exercise; seeing them against each other, is.) KF8-20% KF7--a calculated 20% in px. Lather, rinse, repeat, for each increment of 10%, through 90. I mean, at 100%, we know what we'll get. My one question is about the best original image size to use, so that we don't run into the same thing I ran into yesterday--where an image displayed at 100% because it was physically larger than the screen (my device that's th KF7 testing device is a K2, believe it or not.) The size of the screen is only 600x800px. So, if either of you lads want to make that file for me, to expedite my end at the testing, or has suggestions about the original image size, etc., I'm happy to hear it. Hitch |
|
08-09-2017, 06:41 PM | #29 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Okay, I believe I generated a test EPUB. (Attached to the end of this post.)
This was my methodology: Attached below is the .bat file I used. Imagemagick generates the images that are 200px tall + 300px->1000px wide (in steps of 20px): Spoiler:
This is a breakdown of each Imagemagick argument: Spoiler:
In the HTML itself, I used this basic code: Code:
<h4>Width 100%</h4> <div class="orig"><img class="orig" alt="" src="../Images/300x200.png"/></div> <div class="kf7"><img class="kf7px100" alt="" src="../Images/300x200.png" height="200" width="300"/></div> <div class="kf8"><img class="kf8pc100" alt="" src="../Images/300x200.png" width="100%"/></div> <h4>Width 90%</h4> <div class="orig"><img class="orig" alt="" src="../Images/300x200.png"/></div> <div class="kf7"><img class="kf7px90" alt="" src="../Images/300x200.png" height="180" width="270"/></div> <div class="kf8"><img class="kf8pc90" alt="" src="../Images/300x200.png" width="90%"/></div> [...] <h4>Width 10%</h4> <div class="orig"><img class="orig" alt="" src="../Images/300x200.png"/></div> <div class="kf7"><img class="kf7px10" alt="" src="../Images/300x200.png" height="20" width="30"/></div> <div class="kf8"><img class="kf8pc10" alt="" src="../Images/300x200.png" width="10%"/></div>
Edit: I also attached an EPUB with 600px tall images. Last edited by Tex2002ans; 08-09-2017 at 07:29 PM. |
08-09-2017, 07:35 PM | #30 |
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 correctly or incorrectly on the old Kindle Previewer and on the new Kindle Previewer 3 eInk emulations? * Does my plugin work on actual KF7 devices ? First thing to prove is whether or not my plugin works and gives correct displays on actual KF7 and KF8 devices. If my plugin does work then this will make the next test stage much easier to prove. Test on KP and KP3 only for correct KF7 emulation using only % values: * Run the test epub through the new plugin. * Then manually remove the media query files from the bottom of the appropriate stylesheet. * Remove the class declaration from within the <img> tag in the KF8 image line in the epub and just delete the KF7 image line(in pixels). So you now only have a single KF8 formatted image line(as a %) in the epub. If KP or KP3 displays this image on eInk on test then their emulation is wrong. If they do not display this image(as a %) then their eInk emulations are correct. * 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) in the dialog in my plugin. 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. The above test will prove whether both KP and KP3 eInk emulations are correct or not for images with % values. Last edited by slowsmile; 08-09-2017 at 07:44 PM. |
Thread Tools | Search this Thread |
|
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 |