Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2014, 01:10 PM   #16
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Jellby View Post
That's no (general) solution, I'm afraid.
Hi Jellby;

My solution was for the old .mobi format, but...

Quote:
The problem is not whether the image is taller or wider, which you can know in advance, but whether it is taller or wider than the screen, which you cannot know in advance.
...unless one ereader device has a square screen, then my solution would be valid, no matter the screen size; I can't think in anything that invalidates that. But don't take my answer as if I don't want svg wrappers. You can find lots of posts about svg written by me where I encourage its use (in fact, I use svg a lot).

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 05-15-2014, 03:40 PM   #17
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I don't want to be argumentative, but imagine a 400x350 image, and an 800x600 screen.

How would "height:100%" make it fit the screen? It would be shown at double size, and that'd make it 800x700 (matching the screen's height, 800, assuming that's portable in ePub) and it would be 100 pixels too wide. It's only if the device tries to be smart (and in doing so ignores the CSS) that it may fit
Jellby is offline   Reply With Quote
Old 05-15-2014, 05:00 PM   #18
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Jellby View Post
I don't want to be argumentative, but imagine a 400x350 image, and an 800x600 screen.

How would "height:100%" make it fit the screen? It would be shown at double size, and that'd make it 800x700 (matching the screen's height, 800, assuming that's portable in ePub) and it would be 100 pixels too wide. It's only if the device tries to be smart (and in doing so ignores the CSS) that it may fit
Hi Jellby;

Of course, in that case, the image won't fit the screen, because it can't if it must retain proportions. But even with a svg wrapper, that kind of images (400x350) also won't fit the screen (assuming a 800x600 size). However, in both cases (with or without a svg wrapper) the image will be fully showed and without distortion (in both, portrait and landscape mode). The image will have a showed size of 685.71x300 in portrait mode and a showed size of 400x350 in landscape mode. Do the try with the Obama image I attach:

Click image for larger version

Name:	Obama.jpg
Views:	218
Size:	20.9 KB
ID:	123027

It has a size of 400x350 and this is how it looks in Kindle Previewer:

Click image for larger version

Name:	Obama1.jpg
Views:	214
Size:	37.9 KB
ID:	123028 Click image for larger version

Name:	Obama2.jpg
Views:	216
Size:	38.5 KB
ID:	123029

Below you can check the respective .mobi

Regards

EDIT: When we use percentage to establish the height of an element, that element take the height of its container element. But if the height of this last element is not established, then the height is ignored and replaced by the value "auto". As we don't establish a height for the block element that contains the image, then the image takes the values height="auto" and width="auto" and for that reason the ereader device doesn't ignore the css rules; instead it's obeying rules. But one different thing is when we establish the width of an object in percentage; that case if different from the "height case" and the ereader must respect the width we establish.

I apologize for my english. It's not good and very probably what I wrote above has many grammar errors.
Attached Files
File Type: mobi Height100.mobi (37.7 KB, 129 views)

Last edited by RbnJrg; 05-15-2014 at 05:24 PM.
RbnJrg is offline   Reply With Quote
Old 05-15-2014, 05:30 PM   #19
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
I've just made up an epub file in Sigil using SVG around the cover image. The latest version of Kindle Previewer happily spits out a mobi file, which displays perfectly well on an (actual) early-model Kindle. So the problem seems to have gone away. Might as well use SVG.
exaltedwombat is offline   Reply With Quote
Old 05-15-2014, 07:17 PM   #20
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by exaltedwombat View Post
I've just made up an epub file in Sigil using SVG around the cover image. The latest version of Kindle Previewer happily spits out a mobi file, which displays perfectly well on an (actual) early-model Kindle. So the problem seems to have gone away. Might as well use SVG.
Take in count that Kindle doesn't use the svg cover you have in Sigil. That is a .xhtml cover and Kindle doesn't use it. Instead, it utilizes the image you have in the Sigil's "Images" folder. To be short, doesn't matter if you use or not a svg wrapper for your cover image regarding Kindle and .kf8/.mobi. Read this thread:

https://www.mobileread.com/forums/sho...d.php?t=215088

and specially this post (of the same thread) by Hitch (maybe the bigger expert regarding Kindle in this forum):

https://www.mobileread.com/forums/sho...0&postcount=17
RbnJrg is offline   Reply With Quote
Old 05-15-2014, 08:09 PM   #21
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Is it my imagination, or did the mobi conversion previously object to the presence of SVG? Conversion runs smoothly now, and the result seems as good as would be got by any other means. So why did I used to make a version without SVG for the Kindle conversion? Perhaps I'm going mad :-)
exaltedwombat is offline   Reply With Quote
Old 05-15-2014, 08:43 PM   #22
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by exaltedwombat View Post
Perhaps I'm going mad :-)
You'd be in exalted company then - Henry VI, George III, Nero, van Gogh, Dostoevsky... and me of course

BR
BetterRed is offline   Reply With Quote
Old 05-15-2014, 08:53 PM   #23
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by exaltedwombat View Post
Is it my imagination, or did the mobi conversion previously object to the presence of SVG? Conversion runs smoothly now, and the result seems as good as would be got by any other means. So why did I used to make a version without SVG for the Kindle conversion? Perhaps I'm going mad :-)
As I told you before, doesn't matter if you use or not svg for a cover; anyway Kindle won't use it (AS COVER). Another thing is to use svg INSIDE the ebook. In this last case, the modern Kindle format (.kf8) will use svg but the old Kindle format (.mobi) won't. So, if you want that your ebook will be compatible with the .mobi (the old .mobi, for Kindle 1, Kindle 2 and Kindle DX) format, then you'll have to write a fallback in case you employ svg (and .svg is more, much more than a wrapper ).

Last edited by RbnJrg; 05-15-2014 at 08:57 PM.
RbnJrg is offline   Reply With Quote
Old 05-16-2014, 07:51 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: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by RbnJrg View Post
As I told you before, doesn't matter if you use or not svg for a cover; anyway Kindle won't use it (AS COVER). Another thing is to use svg INSIDE the ebook. In this last case, the modern Kindle format (.kf8) will use svg but the old Kindle format (.mobi) won't. So, if you want that your ebook will be compatible with the .mobi (the old .mobi, for Kindle 1, Kindle 2 and Kindle DX) format, then you'll have to write a fallback in case you employ svg (and .svg is more, much more than a wrapper ).
The problem is, really:

How does it get there from here? If we are discussing COVER images, then you have a whole other issue, which is the supplanting of the (designed by the perfectly competent book designer) cover PAGE and image with the cover image that is uploaded by the user at the KDP. That's where the mascara hits the fan, because the "coverpage.html" page (for a quick description) goes bye-bye. Thus, where goeth all that good ol' SVG coding, she wondered???? Sadly, it goes to code-heaven, where perfectly good coding goes to die.

If we are discussing images in the book file itself, then, yes, you can use SVG, but as Ruben mentions, you gotta use a fallback, and width=100% absolutely is not it. (And if you really want to see why, open any book with that coding on Kindle for PC or K4Mac on a honking big monitor, and go single-column/page. THAT's a real doozy of an experience. Particularly if you're talking something wee, like a fleuron for chapter ends, or what-have-you.

Let me tell you: image use is something we're discussing rather heavily around here, ever since Apple came out a few months ago with its latest dictates, which forces the images to break (across pages) on ADE and many other devices (yes, I'm talking to you, Kobo!). The refusal of the vendors to adhere to ANY BLOODY REGULARIZED STANDARDS at all is just...headache city. And the whole, "cover-image as SVG" issue is one of them (the headaches).

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Svg wrapper and image resizing Nabodita ePub 24 05-02-2014 12:21 AM
Scaling up an image via SVG Kayto ePub 27 01-26-2013 03:38 AM
Sigil and SVG image links Rand Brittain Sigil 1 01-05-2013 05:39 PM
Image overlayed over text (but text visible if image disabled)? Kaylee Skylyn ePub 5 08-01-2012 05:27 PM
How to make image visible? ppharm PDF 2 01-11-2011 06:40 AM


All times are GMT -4. The time now is 09:43 AM.


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