12-12-2013, 05:48 PM | #16 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Only on a square screen will this work in both mode succeed and none of the devices have a square screen. You will end up with empty space in one mode or another. Though for a particular device there might be a way to detect what mode it is in and program it for different images...what a lot of work and only work on that device, should one exist.
|
12-12-2013, 09:42 PM | #17 |
Well trained by Cats
Posts: 30,370
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
does Kobo honor:
max-width: <value here> CSS property to limit the stretch? |
Advert | |
|
12-12-2013, 11:06 PM | #18 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Liliann: Are you trying to do this in an epub or a kepub? The screen shot suggests it is a kepub, but that you have added some options to the config file on the device. If the it is a kepub, how are you producing it? And did you check what happened with the epub?
|
12-13-2013, 07:56 AM | #19 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Also note that "height: 100%" is in essence pretty much undefined. It might work for some devices, but that's a grey area of the spec, and it's bound to fail somewhere (it fails if you try to render in Prince, for example).
|
12-13-2013, 09:11 AM | #20 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2013
Device: none
|
davidfor it's an epub.
Since I'm used to media queries it's hard to accept that I can't have it both ways. And it seems that I can't use a generic solution either, for all of the images. The img { height: auto; width: 100%; } it worked for an image and it looks it adapts to the screen changes, but for the other images it doesn't. That is a mystery for me. I've also tried img { width: auto; max-height: 100%;} and img {max-width: 100%; height: auto;} and even if it changed the image's size in landscape mode, it was still broken. It's like Kobo didn't recognise that is an image that should stay in one piece. I'm getting tired of trying and I still didn't mention another problem that I have only in Kobo but not in iPad, and I'm not sure if I should start another topic... |
Advert | |
|
12-13-2013, 11:07 AM | #21 | |
Wizard
Posts: 1,588
Karma: 7836413
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
12-13-2013, 11:34 AM | #22 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2013
Device: none
|
|
12-13-2013, 12:29 PM | #23 |
Wizard
Posts: 1,588
Karma: 7836413
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
12-13-2013, 01:03 PM | #24 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2013
Device: none
|
I've fixed all the images to fit in portrait mode, but they are still broken in landscape if they are too big to fit in one page or they are at the bottom...
I've attached an image that has these properties: width: 553px; max-width: 100%; height: auto; It's good in portrait mode but it's broken in landscape. Last edited by Liliann; 01-26-2014 at 07:08 PM. |
12-13-2013, 01:38 PM | #25 | |
Wizard
Posts: 1,588
Karma: 7836413
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
12-13-2013, 02:07 PM | #26 |
Wizard
Posts: 1,588
Karma: 7836413
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Hi Liliann;
Well, I don't have Kobo so I can't say if this aproximation works but in ADE looks fine. Tell me how does it work in Kobo the ePub I attached below. Regards Rubén |
12-13-2013, 03:31 PM | #27 | |
Member
Posts: 17
Karma: 10
Join Date: Dec 2013
Device: none
|
Quote:
neither in landscape mode... |
|
12-13-2013, 06:35 PM | #28 |
Wizard
Posts: 1,588
Karma: 7836413
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Well, let's continue trying
Do the following: Open the ePub that I uploaded in my previous post with Sigil and, in the stylesheet.css file write: Code:
.TableCell { display: table-cell; } Code:
<div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 1153 1577" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image class="TableCell" height="1577" width="1153" xlink:href="../Images/flame.jpeg"></image> </svg> </div> Code:
<div class="TableCell">
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 1153 1577" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image class="TableCell" height="1577" width="1153" xlink:href="../Images/flame.jpeg"></image>
</svg>
</div>
Code:
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 1153 1577" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image class="TableCell" height="1577" width="1153" xlink:href="../Images/flame.jpeg"></image>
</svg>
</div>
|
12-13-2013, 11:18 PM | #29 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
What are you actually using to view this? I assumed a Kobo e-ink device, but, I just noticed that the photos showed colour on the screen. Are you using a Vox, an Arc or the Kobo app on an Android or iOS device?
And for the record, attached are screenshots taken on a Kobo Glo with the latest firmware. This is with RbnJrg epub. "flame_epub.png" is of the epub which uses the Adobe based reader. "flame_kepub.png" is loaded as a kepub which uses the ACCESS based reader. |
12-15-2013, 01:00 PM | #30 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2013
Device: none
|
I'm testing it on Kobo Arc.
Rubén, with your first solution there is only one page and the image is missing in a mysterious way...the second one does the same. Is there any way to disable the landscape mode only on Kobo? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PNG Images in ePUB Files not rendered on Kobo | DragonflyKing | ePub | 12 | 10-12-2013 08:28 PM |
Images are broken across 2 pages after converting to ePub from RTF. iPhone. | vital2k | Conversion | 2 | 05-31-2011 01:46 AM |
No images in kobo epub books? | jayupark | Kobo Reader | 8 | 03-29-2011 04:06 PM |
Multi-level TOC broken in epub->epub conversion | siebert | Conversion | 14 | 03-09-2011 05:38 PM |