![]() |
#31 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
![]() There is a common sense way to deal with this: - if there is an unique percentage width value required for one image, I think it's more handy to use an inline style because you get an immediate control over it. Furthermore, it works faithfully absolutely everywhere (@Hitch, please feel free to tell me if I am wrong). ![]() - if there is a common value for a group of repeated images as DNSB said "(fleurons. flourishes, vignettes, images used with chapter headers, etc.)" it also makes sense to keep this value in the stylesheet. This is the way I proceed usually: I give first a common value to all images (this can be done also with a CSS class ), and then, when required, go from one individual image to another and correct this value or this class by replacing it with its individual percentage. I have an example of a book with sixty images. 21 of them will benefit from individual percentages (under 100%) while the remainder are OK with a 100% width. I deal first with all images, giving them all the group percentage (100%), and then for these 21 others I jump from one image to another and change this common value to their individual one. Whatever may be, I feel there is a need to jump from one image to another every time an image needs an individual percentage. That is the price you have to pay to get a very precise display. That's why it would be very handy: - if as a minimum Sigil informed me in its report file by calculating which images fall under the "below 100%" percentage. It would do half of the homework. - ideally if some plugin could automatically insert this individual inline value within the (here 21) images tags which need it. This represents the other half of the homework. One last remark about "philosophy". I have rather trust my own calculations than rely on the haphazard understanding of various rendering engines in interpreting individual image sizes... I have had too many disappointments on this regard because if anything goes wrong -even a little-, you are unable to correct it easily (at simple view). Last edited by roger64; 08-01-2017 at 07:21 AM. Reason: homework and "philosophy" |
|
![]() |
![]() |
![]() |
#32 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@Hitch...It's funny that you asked me that question because I'm currently writing a Sigil plugin that will convert all absolute sizing and spacing values(e.g. pts, in, mms, cms, pc) in the epub stylesheet(s) to relative "em" values. So I guess you must be psychic...
...And the answer to your question is very similar. If we are talking epubs, Kindle, as well as other ereader vendors, don't like us using pixels(an absolute measure) for images smaller than 100% of the screen size. Kindle prefers smaller image dimensions as a value relative to current screen width -- in percentages. So if you don't use % values for your smaller images and use pixels instead then your smaller images will be screwed by the Kindle software as I've found with some Kindle conversions in the past. Lesson learned. Always use percentage values for your smaller ebook images for Kindle or it will be changed willy-nilly by the Kindle software viz the Kindle overrides. And as roger64 has said, using % values for smaller images will also work across all ereader types. In case you get me wrong, what I am inferring is this...If you, me and roger64 can easily calculate the value of a smaller image in pixels and convert this to a % value for Kindle then why can't the Kindle software team do this transformation and simple calculation for us when they display these smaller images on Kindles -- and do it accurately? ![]() Last edited by slowsmile; 08-01-2017 at 09:07 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#33 | |||||
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:
Y'know, William, I have NEVER seen this. Not once have I seen the rendering engines screwing up our images that have % settings (as do all our images). Are you perchance discussing the LITB? Do you have a book where that's happened? Granted, you can't rely on % settings/CSS altogether. You just can't. You have to create inline sizing, in hard pixels, for KF7, if you have an image that's smaller than 100% of the width of the screen. But that's that. Now, we do that for every single image--every one--that we do, that's smaller than 100%, b/c we have fallback for everything, for KF7, whether it's media queries for the CSS or this, for images. And I have never had a single complaint--in 3500 eBooks--with some client saying that her images were squooshed. Quote:
Wanna make a wild guess as to why? Seriously? Hitch |
|||||
![]() |
![]() |
![]() |
#34 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,282
Karma: 169098402
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Does this require treating image sizing differently for KF7/azw/mobi vs. KF8 format? And perhaps this might be best moved elsewhere. Topic drift at the least. |
|
![]() |
![]() |
![]() |
#35 | |||
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:
(Now watch, just 'cuz I said that, we'll get moved...) Hitch |
|||
![]() |
![]() |
Advert | |
|
![]() |
#36 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
![]() One argument again the use of percentage is falling: whether you use hard pixel sizing or relative percentage width , the display of your image will vary according to the size of your screen. So this argument should not be used to condemn the use of percentage width. Now the question of format. Though I own a Kindle PW3, I never read any azw book (nor KF8). I put my brand new Kindle in a drawer and waited patiently four months till a jailbreak was released. After that, I only read EPUBs or 9×12 PDF... As I am not a commercial editor, I'll take care only of EPUBs. To repeat what I already said, percentages width on EPUBs are rendered very precisely with Koreader, these EPUBs can also can be converted so precisely to 9×12 format with Prince PDF (a Sigil and Calibre plugin) that I even use this format to check the display of my EPUBs (namely the images)... Last edited by roger64; 08-01-2017 at 05:50 PM. |
|
![]() |
![]() |
![]() |
#37 | |||
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Well, Hitch, I must disagree with you again:
Quote:
Second point. Do you know the main advantage of using inline styles? In html you have external css and internal css. The external css is the stylesheet(s) that is outside the html whereas an internal CSS is defined within the html itself. What is the main purpose or advantage of using an inline style in the html? Answer: Quote:
Quote:
So if an inline style is not in the external stylesheet but is in the html code, and given that your above KF7 generalization is somewhat wrong, isn't it reasonable to assume that inline styles will work on KF7 devices? Last edited by slowsmile; 08-01-2017 at 08:35 PM. |
|||
![]() |
![]() |
![]() |
#38 |
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
|
Fine, William.
Why on earth would anyone think that I MIGHT know whereof I speak? In that case, go right ahead with ems. Have fun. Hitch |
![]() |
![]() |
![]() |
#39 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Kindlegen may be able to take some css and convert it into html3.2 that the KF7 rendering system can use, but the rest is just dropped. Hitch is right: no css in an old-style mobi7 kindlebook. Unpack one yourself and see. You basically have height/width attributes for paragraphs and blockquotes for a bit of left margin (nest blockquotes to increase the margin). And that's about the extent of the toolbox you get to work with when formatting a KF7 Kindlebook. Last edited by DiapDealer; 08-01-2017 at 08:31 PM. |
|
![]() |
![]() |
![]() |
#40 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DiapDealer...Thanks for clarifying. But several points come into question here. First you mention that 'height' and 'width' are acceptable in KF7 -- is this only for paragraphs and blockquotes or can they be used for image dimensions? Can we therefore also assume(getting back to the original subject of this post) that using height and width as percentages in an inline style for KF7 will work for KF7s as well as all other ereaders? Or is inline styling also a non-starter for HTML 3.2 ?
Last edited by slowsmile; 08-01-2017 at 09:04 PM. |
![]() |
![]() |
![]() |
#41 | |
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:
Sorry: to clarify: KF7 does NOT UNDERSTAND PERCENTAGES. For the last damn time!! Hitch Last edited by Hitch; 08-01-2017 at 09:04 PM. Reason: Added clarification. |
|
![]() |
![]() |
![]() |
#42 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Thanks Hitch.
|
![]() |
![]() |
![]() |
#43 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Regardless of how you specify your image sizes in your KindleBook source epub/xhtml, they will be reduced to height="xxx" width="xxx" in the old-style mobi (xxx being pixels).
Code:
<p height="0pt" width="0pt" align="center"><img src="Images/image00093.jpeg" align="baseline" height="600" width="400"></img></p> |
![]() |
![]() |
![]() |
#44 | |
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:
When you code images for "Kindle," you have to set the size for KF8 in percentages, and the size for the KF7 in pixels--period. It sucks, but there it is. I WISH that KF7 would use %, because then we could either just use the same damn CSS, or some type of media-query fallback--but we CAN'T. Hitch |
|
![]() |
![]() |
![]() |
#45 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
That does not make at all the concept of a near future "percentage plugin" less useful or irrelevant. Bugs in old versions of software should not block any progress. Its use has just to be an informed choice. For me at least, the advantages of this near future plugin offset these drawbacks. Using an inline percentage width provides you with a very powerful and easy to use tool (one image, one value) to control precisely your image display. Quote:
Last edited by roger64; 08-02-2017 at 02:19 AM. |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin for inserting endnotes in an epub 2.0 | elibrarian | Plugins | 51 | 12-20-2023 09:28 AM |
Maximize Image Width | Cyberseeker | ePub | 19 | 06-07-2017 02:53 PM |
Changing image width in the economist | goios | Recipes | 1 | 04-24-2014 01:29 PM |
Inserting a background image | roger64 | ePub | 1 | 12-28-2012 06:12 AM |
ADE bug in calculating width | DaleDe | ePub | 6 | 01-17-2010 09:33 AM |