![]() |
#16 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
It depends on what is meant by "following the specs". Using non-supported CSS properties in an ePub does not make it invalid. It may not display as intended, but it does not break the spec. (And, unlike the case when only "supported" properties are used, the renderer is not to blame.)
|
![]() |
![]() |
![]() |
#17 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Dec 2014
Device: iPad, Nexus 7, iPhone 6
|
I did some tinkering and found a way to get what I want.
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head xmlns="http://www.w3.org/1999/xhtml"> <meta content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" name="generator" /> <meta content="width=737, height=575" name="viewport" /> <title>Audacious Little Princesses</title> <style type="text/css"> body {width: 737px; height: 575px; margin: 0; } img {max-width: 100%; max-height: 100%; } </style> </head> <body> <div><img alt="" src="../Images/page1.jpg" width="737px" /></div> </body> </html> Quick question. What would be the best image format to use in terms of quality? I have high quality png files, but they're really big. I reduced them to jpg files, but I feel that the quality has dipped a little bit. Basically, I want something that isn't too big and retains most of its quality. |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
|
Quote:
Often a 256-color png can look better than a heavily-compressed 16million color jpeg. You would have to test and see. But 256-color pngs don't support gradients very well, so you might see banding. If your graphics editor supports choosing the color-count reduction method, I would recommend testing 256 colors (do NOT use "web-safe" pallet, it is UGLY, even if it is smaller.). You might find a happy solution. Good luck! |
|
![]() |
![]() |
![]() |
#19 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Dec 2014
Device: iPad, Nexus 7, iPhone 6
|
Thanks for the reply. I actually found this site here and it works perfectly. https://tinypng.com/
|
![]() |
![]() |
![]() |
#20 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
|
yep, that's what TinyPng does --- it reduces the color-count. Glad that works for you!
But do make sure you examine each image when it is finished to make sure the color-reduction didn't turn out "posterized". |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Dec 2014
Device: iPad, Nexus 7, iPhone 6
|
Will do!
|
![]() |
![]() |
![]() |
#22 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,776
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sho...9&postcount=14 As I said in that post, that solution would work for any plataform if your images are all of the same size. However, take care if there is an image of -let's say- 737 x 300px. In that case image won't be centered on your screen (and that was your first goal ![]() Regards |
|
![]() |
![]() |
![]() |
#23 |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Hmm. I could have sworn I had code in there to vertically center the result. Well, that's easy to fix either way. Just add text-align: center on the enclosing div.
|
![]() |
![]() |
![]() |
#24 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,776
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Last edited by RbnJrg; 12-24-2014 at 04:10 PM. |
|
![]() |
![]() |
![]() |
#25 | |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
![]() The SVG code I posted does, in fact, center the image, both vertically and horizontally. That's handled by the "mid" in preserveAspectRatio="xMidYMid". The containers are all styled to fill the body size, which in the absence of content that would overflow the bounds, fills the viewport. So by adding the image and telling it to scale to fit, centered, within that container, you're effectively centering within the viewport. Try it in a browser, and you'll see that it remains centered, regardless of which dimension is larger than the content. And because it is SVG, if you want to include captions, you can readily do so using SVG text elements, giving you complete control over the page layout, and the resulting text should still be searchable as text in most readers. Last edited by dgatwood; 12-26-2014 at 11:10 AM. |
|
![]() |
![]() |
![]() |
#26 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,776
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
![]() Quote:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Cover</title> </head> <body> <div> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" height="100%" width="100%" preserveAspectRatio="xMidYMid meet" viewBox="0 0 2040 2640"> <image width="2040" height="2640" xlink:href="../Images/frontcover.jpg" /> </svg> </div> </body> </html> https://www.mobileread.com/forums/sho...4&postcount=20 Regards |
|
![]() |
![]() |
![]() |
#27 |
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
|
n.b.:
If the OP is trying to make what is essentially a fixed-format ePUB for iBooks--that is, for intake into iBooks, to be sold as a children's book or other FF-platform book (like a coffee-table book), then he may not be very happy with the results, as iBooks has pretty clearly-laid-out specifications for making FF books. Your solution, Ruben, despite being lovely, probably won't pass intake at iBooks, IF that is what he is doing. Just a note of caution. Hitch |
![]() |
![]() |
![]() |
#28 | ||
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
![]() |
#29 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,776
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
It's included because of a bug in some readers; if you don't include "meet" or "slice", then they doesn't take in count "preserveAspectRatio" (why do you thing that Sigil uses that parameter when you add a svg cover?
![]() Last edited by RbnJrg; 12-27-2014 at 06:58 AM. |
![]() |
![]() |
![]() |
#30 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,776
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smashwords formatting issue | Flumplepuss | Writers' Corner | 2 | 11-04-2014 11:36 AM |
PB360+ Formatting issue | Japes | PocketBook | 1 | 07-15-2014 06:06 AM |
Formatting issue | jhempel24 | Sigil | 4 | 03-08-2012 01:40 PM |
Image formatting without stretching | Vanguard3000 | Sigil | 2 | 03-04-2011 01:15 AM |
image on separate page without half-page text next | Toxaris | ePub | 2 | 01-26-2011 03:32 AM |