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 Yesterday, 08:23 PM   #76
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
Hitch an st_albert...I'll try and clarify things.

...

Here's the oddity: Everyone has said that images dimensions defined in percentages within an image tag cannot be displayed on older KF7 devices. But when Hitch and I look at the KF7 displays for this epub we both see the image(formatted with % dimensions) plain as day. Well, according to what everyone's been saying -- you should see no image if you code your image using percentages on KF7 devices. Right?

Does everyone understand the problem or oddity that I'm reporting now?
I have never said that images coded with width/height values in % will not display on KF7 devices.

In post # 34 I said:
Quote:
If I understand correctly what you are doing here, I predict that both images will be displayed, but only the pixel-coded one will display as intended (unless by chance, the %-coded one happens to have just the right native image size, or something.)
and in post #36 I tried to give more detail as to what was happening during the conversion from epub to mobi KF7 using kindlegen:

Quote:
I think we're talking about two different things. I should have been clearer. Let me go through what I think is happening with image tags specifying a width in percent. This is an example from a test I actually ran on that old epub->mobi I have mentioned before. I took the old epub and ran it through a modern kindlegen to produce a dual-format mobi, which I then split into its KF7 and KF8 components, and examined the html code in the kf7 part.

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>
(this was taken from the source-code section of the dual-format mobi, so it's fair dinkum.

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>
Note that the width directive had been stripped out, but the image tag is still there. It will display with dimensions of the original image or full-screen, which ever is smaller. I think. But, it will display, I'm sure. Remember, I'm ONLY testing this in the previewer v.2.8 emulation of a DX. If that emulation is fubar, as Hitch suspects, then all bets are off for real-world devices. Which is one of the things we're trying to determine here, right?

...

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.

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.
Additionally, in posts #71 and #73, using a modification of your Test2.epub, (post 71) I demonstrated the fact that width/height values in % are ignored in the conversion to KF7, but the image tag is still there, and is displayed albeit wrongly.

If I have still been unclear, I think it's time for me to give up.

And, granted it has nothing to do with this oddity, I did see some behavior from your plugin that I thought might be buggy. It's described in the last paragraph of post #71:

Quote:
Also, when I tried the plugin on the modified epub, it made both images width: 16% for the kf8 styling. Is this supposed to happen? (plugin version 0.1.3)?
Albert
st_albert is offline   Reply With Quote
Advert
Old Yesterday, 11:03 PM   #77
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,290
Karma: 49372483
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 an st_albert...I'll try and clarify things.

First thing to understand is that the KP and KP3 weirdness that I'm reporting has nothing whatsoever to do with the new plugin. The problem also has nothing to do with image sizing etc.

Everyone has been saying that KF7 devices cannot display images whose height and width dimensions are in percentage values. Right?

Now run this very simple test. Open the epub that I sent Hitch(see my last post) on KP and KP3. Do you see an image on the KP and KP3 eInk displays ? If you do see an image in the eInk displays then that's the oddity or problem.
William--do you...are you saying that you thought that what I was saying, all this time,or what Albert is saying, is that if you code an image for KF7, using a %, that it won't display AT ALL?

I never said that. And it's not what I meant, nor what I ever meant. I simply meant what I thought I said--that using %, to cause an image to display AT A SPECIFIC SIZE, would not work. I never meant that using %, either in the CSS or inline, would somehow cause the image to not show up at all.

n.b.: I just went over the prior thread, in which there was a heated discussion about this, and we NEVER said this. We stated, repeatedly, that KF7 will ignore any CSS using %, and the resulting image would just display as if no size were set, at all. Nobody ever said that the images would simply disappear as if they didn't exist.

Quote:
The test epub just contains just one image coded thus:

<p class="scrivener5"><img alt="" src="../Images/eagle.jpg" style="width: 50%;height: auto;"/></p>

Please also note in the above code that I'm using inline styling with percentages. It also appears that everyone is seeing this image too on their KP and KP3 eInk displays. Right?
Yes, of course we're seeing it.
Quote:
Here's the oddity explained: Everyone has been saying that images dimensions defined in percentages within an image tag cannot be displayed on older KF7 devices. But when Hitch and I look at the KF7 displays for the test epub we both see the image(formatted with % dimensions) plain as day. Well, according to what everyone's been saying -- you should see no image if you code your image using percentages on KF7 devices. Right?
No. This is a misunderstanding. I said, the coding CANNOT be used, because it doesn't work. The image displays at the wrong size.

Quote:
All you have to do to confirm my findings is just open the test epub in KP and KP3 and then just report back here if you see a centered image or not in their eInk displays. And please don't complicate things by dragging in image sizing, positions etc in your observations -- the latter is completely irrelevant to this test. This test is only meant to prove or disprove whether using inline styling(with % dimensions) will display ebook images correctly on KF7 devices.
It's not, really, irrelevant. You had said, at some point in time, that we could style KF7 images using %--and we can't. The resulting display is wrong. That's why I bothered to take all those images. You'd said that you'd seen KF8 and KF7 images, displaying as if BOTH were being styled by the KF8 coding. That's why I did the screenshots.

Quote:
And here's the most important thing. If you confirm what I have said above to be right(just confirm if the centered image is there or not in the eInk displays-- that's all I care about!!), then there seems to be absolutely no need to use media queries with dual formatting to ensure proper image display on both KF7s and KF8s. All you have to do is just use a single image line that has been styled using inline styling with % values in your image tag and you image(s) will be appropriately displayed on both KF7 and KF8 devices without a problem.
William--even ignoring the fact that there's some massive misunderstanding here--didn't you notice that the image displays at the wrong size? I mean, even if we DID mean that it would somehow be turned invisible, using the %, and even assuming arguendo that were true, the end result of your coding in the single element is that the KF7 image is the wrong size.

Quote:
And don't worry Hitch, I'm not going to change my plugin code because of the above discovery. But as far as I'm concerned, just bear in mind that there is not just one way to format your epub for KF7 and KF8 image displays. There is also a much easier second way of doing this as I have a already described in the paragraph above.
As I mentioned, we have a similar clip for Epsilon, but thanks. I thought I was helping you make a plugin for other folks.

Quote:
Does everyone fully understand the problem or oddity that I'm reporting now?
Well, I understand, now, what you've misunderstood about what I, Diap, etc., all said. But...honestly, William, I don't understand how you came to that misconstruction. But anyone can have a brain fart.

Nonetheless, the plugin works. The KF7 coding--the coding done correctly, with its own line of code, using Hidden, etc., works fine. The one-line coding, which we all know has nothing to do with the plugin, trying to do both KF7 and KF8, doesn't work, because the image displays incorrectly.

Are we all on the same page now?

Hitch
Hitch is offline   Reply With Quote
Old Today, 08:33 PM   #78
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: 177
Karma: 12036
Join Date: May 2013
Location: Philippines
Device: Android S5
OMG...Why are people still talking about my plugin and dual formatting?

In my last post I specifically said and advised in the first paragraph in my last post:
Quote:
First thing to understand is that the KP and KP3 weirdness that I'm reporting has nothing whatsoever to do with the new plugin. The problem also has nothing to do with image sizing etc.
So why is everybody still talking about dual formatting and sizing?

Hitch said:
Quote:
"William--do you...are you saying that you thought that what I was saying, all this time,or what Albert is saying, is that if you code an image for KF7, using a %, that it won't display AT ALL?"
No Hitch -- I'm saying directly the opposite of your comment above. Have you run the test epub that I sent you in my last email? If you had done that then you would have seen it. The epub only contains one image line(its NOT dual formatted for KF7 and KF8) which has been formatted using % height/width values. If you look at that epub in KF7 emulations then you will see the image -- and that shouldn't happen(because % values should not display on KF7 devies). Got it?

Hitch said:
Quote:
No. This is a misunderstanding. I said, the coding CANNOT be used, because it doesn't work. The image displays at the wrong size.
Perhaps it was a misunderstanding like you say. But my take on this is that if you format % values in the standard way(using height width as attributes in an image tag) then it will not display or it will display the wrong size -- I haven't tested this so I could be wrong. But if you're using inline styling in an image tag for % height/width then that's certainly not the same as using the standard method of declaring the height/width values in an image tag. Assuming that these two methods will give the same result is also quite a dangerous assumption. And my observations when I use the inline styling method for height/width with % dimensions are that it does display correctly as a percentage of the screen width when you use inline styling for the height/width dimensions. In the test epub I sent you(which uses inline styling with percentage dimensions) I have observed that the image displays at 50% of screen size -- which is correct(Don't forget that the image of the hawk will have a larger but unseen white canvass boundary around it as well).

Hitch...All I'm really doing is passing on some observations about KF7 formatting oddities to you because I know that you like hearing about Kindle problems/oddities. I've done this deliberately because you were generous enough to fully test my new plugin for me. But I never thought that this discussion would turn into such a long discussion and create so much confusion. I hope that what I've been saying is clearer now.

To be honest with you, I really don't care that much about this oddity that I'm reporting. I'm just happy that the plugin works OK...
slowsmile is online now   Reply With Quote
Old Today, 08:55 PM   #79
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
@slowsmile
Well I don't know what to say, other than to echo H. L. Menckin

Quote:
"You may be right."
So, let's get back to the plugin. Can you enlighten me about this question? (from post #71, which has more details);

Quote:
Also, when I tried the plugin on the modified epub, it made both images width: 16% for the kf8 styling [instead of 50% and 20% resp.]. Is this supposed to happen? (plugin version 0.1.3)?
Thanks,

Albert

who still says, pace @Hitch, KF7 delenda est.

Last edited by st_albert; Today at 08:57 PM. Reason: details
st_albert is offline   Reply With Quote
Old Today, 09:18 PM   #80
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,290
Karma: 49372483
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
OMG...Why are people still talking about my plugin and dual formatting?

In my last post I specifically said and advised in the first paragraph in my last post:


So why is everybody still talking about dual formatting and sizing?

Hitch said:


No Hitch -- I'm saying directly the opposite of your comment above. Have you run the test epub that I sent you in my last email? If you had done that then you would have seen it. The epub only contains one image line(its NOT dual formatted for KF7 and KF8) which has been formatted using % height/width values. If you look at that epub in KF7 emulations then you will see the image -- and that shouldn't happen(because % values should not display on KF7 devies). Got it?

Hitch said:

Perhaps it was a misunderstanding like you say. But my take on this is that if you format % values in the standard way(using height width as attributes in an image tag) then it will not display or it will display the wrong size -- I haven't tested this so I could be wrong. But if you're using inline styling in an image tag for % height/width then that's certainly not the same as using the standard method of declaring the height/width values in an image tag. Assuming that these two methods will give the same result is also quite a dangerous assumption. And my observations when I use the inline styling method for height/width with % dimensions are that it does display correctly as a percentage of the screen width when you use inline styling for the height/width dimensions. In the test epub I sent you(which uses inline styling with percentage dimensions) I have observed that the image displays at 50% of screen size -- which is correct(Don't forget that the image of the hawk will have a larger but unseen white canvass boundary around it as well).

Hitch...All I'm really doing is passing on some observations about KF7 formatting oddities to you because I know that you like hearing about Kindle problems/oddities. I've done this deliberately because you were generous enough to fully test my new plugin for me. But I never thought that this discussion would turn into such a long discussion and create so much confusion. I hope that what I've been saying is clearer now.

To be honest with you, I really don't care that much about this oddity that I'm reporting. I'm just happy that the plugin works OK...
William:

I don't think you read my post. My observations have NOTHING to do with your plugin. The image from your test2.ePUB, that you think is showing correctly, isn't. Period. It's not remotely 50% of the screen. I discussed, in pixel-detail, the white space on the left side of the image, too.

I used YOUR coding, inline. I tested YOUR ePUB. It's not displaying correctly in KF7. That's it, William. It has nothing to do with the plugin.

Hitch
Hitch is offline   Reply With Quote
Old Today, 09:44 PM   #81
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: 177
Karma: 12036
Join Date: May 2013
Location: Philippines
Device: Android S5
st_albert...Because the plugin calculates the image size to a base fixed width size I'm afraid that a ballpark or average image size can only be expected from the calculation I used in the plugin which is shown below:

Image-width-inpixels/630 x 100

And because the base screen width is 630px -- a fixed value -- that also means there will always be variance because the widths from all readers will always vary a little from that 630 base width value.. So this plugin certainly is not perfect. But it will still save you alot of time even if you have to adjust the the individual % widths to your own liking. That's surely quicker than having to manually dual format every single image in your epub which, as Hitch has said, is a long drudge job if you have to dual format 200 images in your epub.

Last edited by slowsmile; Today at 10:00 PM.
slowsmile is online now   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 10:00 PM.


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