Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-07-2017, 07:47 PM   #16
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by slowsmile View Post
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 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 i.e. both apps were displaying the larger KF8 image . This means that both KP and KP 3 will display KF8 images(as a %) for their eInk emulations. And this is completely wrong, so these apps cannot be trusted to test KF7/KF8 displays. Worth remembering.
Well...I need to test that myself, first. Nothing personal; I just want to see what's what, before I test the plugin. Otherwise, I could be testing it from a wrong place to begin with.

Hitch
Hitch is offline   Reply With Quote
Advert
Old 08-08-2017, 12:46 PM   #17
st_albert
Guru
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 637
Karma: 94420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by st_albert View Post
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>
and were tweaked in the epub, then converted with kindlegen (cmd line version, not the previewer), and tested on a real-world K3 (which hadn't been upgraded for kf8).
For completeness, I dug around in the "book.html" file within the mobi7 formatted .mobi, and the above line is coded thusly (HTML 3.0, I think):

Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p>
so it seems to have simply ignored the "width:77%" directive in the original epub.

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."
st_albert is offline   Reply With Quote
Old 08-08-2017, 04:35 PM   #18
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by st_albert View Post
For completeness, I dug around in the "book.html" file within the mobi7 formatted .mobi, and the above line is coded thusly (HTML 3.0, I think):

Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p>
so it seems to have simply ignored the "width:77%" directive in the original epub.

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."
Well, yes. That's what it's supposed to do--ignore the % setting, in the KF8 coding, entirely. (Am I not paying enough attention here, which is always possible? Are we saying something other than what I think we are???? )

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:

When the iPads came out, not instantly, but shortly after, for testing purposes, I purchased a first-gen, top of the line. Within less than a year, Apple had stopped supporting it, and the OS. This was a four-digital purchase, brand-new...and they just assumed that of course, like a little lemming, I'd g buy some NEW Apple product. I've also heard similar tales, abot7 everything--laptops, software, OSes--from many of our clients, over and over. It think it's at best a cavalier way to treat your clients, and at worst, just the worst sort of example of rapacious capitalism. Apple lost me, forever, as a client, when they threw away my $1400 purchase, or whatever it was, with no regard whatsoever for my hard-earned. People can badmouth Amazon and MSFT as much as they like, but AMZ still supports K1's, some 10+ years down the road, and MSFT earned a LOT of undying loyalty, supporting XP for what, 16 years? They were on Win10, before they officially gave over, on XP? Lotta love for that type of customer support.


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
Hitch is offline   Reply With Quote
Old 08-08-2017, 05:31 PM   #19
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 49,714
Karma: 42906343
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Hitch View Post
People can badmouth Amazon and MSFT as much as they like, but AMZ still supports K1's, some 10+ years down the road, and MSFT earned a LOT of undying loyalty, supporting XP for what, 16 years? They were on Win10, before they officially gave over, on XP? Lotta love for that type of customer support.
You have to give Kobo even more credit. The oldest touch models can run the current firmware.
JSWolf is offline   Reply With Quote
Old 08-08-2017, 05:42 PM   #20
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by JSWolf View Post
You have to give Kobo even more credit. The oldest touch models can run the current firmware.
Yup, them, too. Now, that's customer service.

Hitch
Hitch is offline   Reply With Quote
Advert
Old 08-08-2017, 06:55 PM   #21
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
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:
  • The plugin seems to work. Obviously, I need to keep testing.
  • The DX emulation MAY have a bug that makes it display certain images too large or full-screen.
  • I need to bracket-navigate what makes it blow up.
  • The Voyage had a similar issue; in KF8, the moment you made something 51%, it was full-screen.
  • I don't know if this is the same yet.

That's all I know thus far. Oh, William: nice plugin.

Hitch
Hitch is offline   Reply With Quote
Old 08-08-2017, 08:40 PM   #22
slowsmile
Witchman
slowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of light
 
Posts: 216
Karma: 12036
Join Date: May 2013
Location: Philippines
Device: Android S5
Double entry

Last edited by slowsmile; 08-08-2017 at 08:44 PM.
slowsmile is offline   Reply With Quote
Old 08-08-2017, 08:42 PM   #23
slowsmile
Witchman
slowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of light
 
Posts: 216
Karma: 12036
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>
...Was turned into this code on KF7:

Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p>
The most urgent question is -- Did the KF7 display the image correctly(the second version) on a Kindle device in the test above ?

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...
slowsmile is offline   Reply With Quote
Old 08-08-2017, 09:29 PM   #24
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by slowsmile View Post
@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>
...Was turned into this code on KF7:

Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p>
The most urgent question is -- Did the KF7 display the image correctly(the second version) on a Kindle device in the test above ?

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...

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
Hitch is offline   Reply With Quote
Old 08-08-2017, 10:23 PM   #25
slowsmile
Witchman
slowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of light
 
Posts: 216
Karma: 12036
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.
slowsmile is offline   Reply With Quote
Old 08-08-2017, 10:50 PM   #26
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by slowsmile View Post
@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.
Well, I can't speak for Newt, and he's busy talking for the Prez, but it's most certainly NOT for naught. (FYI: we have a clip in Epsilon, that does this too. BUT, I'm 100% happy to help test a plugin for other folks.)

Hitch
Hitch is offline   Reply With Quote
Old 08-09-2017, 10:11 AM   #27
st_albert
Guru
st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.st_albert has top level security clearance to Area 51.
 
Posts: 637
Karma: 94420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by slowsmile View Post
@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>
...Was turned into this code on KF7:

Code:
<p height="0" align="center"> <img alt="images/image002.jpg" src="Images/image00019.jpeg"/> </p>
The most urgent question is -- Did the KF7 display the image correctly(the second version) on a Kindle device in the test above ?

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...

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
st_albert is offline   Reply With Quote
Old 08-09-2017, 12:53 PM   #28
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,594
Karma: 52689083
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by st_albert View Post
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
Albert:

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
Hitch is offline   Reply With Quote
Old 08-09-2017, 06:41 PM   #29
Tex2002ans
Guru
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 859
Karma: 3900001
Join Date: Jul 2012
Device: 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:
Code:
convert -size 300x200 xc:black -fill black -stroke white -draw "line 0,100 300,100" -gravity North -pointsize 72 -annotate +0+0 300x200 300x200.png
convert -size 320x200 xc:black -fill black -stroke white -draw "line 0,100 320,100" -gravity North -pointsize 72 -annotate +0+0 320x200 320x200.png
[...]
convert -size 980x200 xc:black -fill black -stroke white -draw "line 0,100 980,100" -gravity North -pointsize 72 -annotate +0+0 980x200 980x200.png
convert -size 1000x200 xc:black -fill black -stroke white -draw "line 0,100 1000,100" -gravity North -pointsize 72 -annotate +0+0 1000x200 1000x200.png


This is a breakdown of each Imagemagick argument:

Spoiler:
  • -size 1000x200
    • This is the ultimate width/height of the image
  • xc:black + -fill black + -stroke white
    • This stuff just sets the color of background + line/text
  • -gravity North
    • This just tells Imagemagick where to place the text.
    • North means top/center of image.
  • -pointsize 72
    • This just tells Imagemagick what size text.
  • -annotate +0+0 1000x200
    • This writes the text "1000x200" onto the image.
  • -draw "line 0,100 1000,100"
    • This draws a line from Point A to Point B.
    • Note: Since the height of all images = 200, the midpoint = 100.
      • So the line goes from left midpoint (X = 0, Y = 100) to the right midpoint (X = 1000, Y = 100).
  • 1000x200.png
    • This just tells it what to name the output file.


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>
Under each Width, there are 3 images:
  • orig
  • kf7px##
    • This is resized height/width with exact px
      • Example: 80% -> 1000x200 = 800px x 160px
  • kf8pc##
    • Just the width is resized to a given percent.

Click image for larger version

Name:	ExampleResizeKF7.png
Views:	18
Size:	30.5 KB
ID:	158341 Click image for larger version

Name:	ExampleResizeKF8.png
Views:	17
Size:	20.6 KB
ID:	158342

Edit: I also attached an EPUB with 600px tall images.
Attached Files
File Type: bat TexGenerateImages20px.bat (5.2 KB, 12 views)
File Type: epub TestKF8Resizing[200px].epub (374.7 KB, 14 views)
File Type: epub TestKF8Resizing[600px].epub (407.0 KB, 13 views)

Last edited by Tex2002ans; 08-09-2017 at 07:29 PM.
Tex2002ans is offline   Reply With Quote
Old 08-09-2017, 07:35 PM   #30
slowsmile
Witchman
slowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of lightslowsmile is a glorious beacon of light
 
Posts: 216
Karma: 12036
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.
slowsmile is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 09:00 PM.


MobileRead.com is a privately owned, operated and funded community.