Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-27-2020, 06:26 PM   #1
Land_Outcast
Enthusiast
Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!
 
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
About transparency

Hey there, until now I would have used PNG for icons with transparent backgrounds (with all those fancy color schemes, a white background looks awful).
But now I see a really poor rendering of PNGs on ADE, so I thought to use SVGs (but they aren't allowed by Amazon's lastest format).
Ang GIFs really look awful, especially in curves.
Does anyone have a suggestion on what to do about it?
Land_Outcast is offline   Reply With Quote
Old 05-27-2020, 10:08 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
What sorts of images are you working with? I assume these are purely vector drawings since you mentioned SVG as well.

And are you trying to have this as little symbols inline scaling with text? Or are they completely separate large graphics?

Back in 2013, inline SVGs were written about in "Apple symbol and other special characters in ePub".

Quote:
Originally Posted by Land_Outcast View Post
But now I see a really poor rendering of PNGs on ADE,
What's the rendering issues you're getting on ADE? I know their image scaling algorithm is garbage, but that's across the board.

In Amazon's ecosystem, transparent PNGs aren't well supported. Last I recall, they're automatically converted into JPGs. (And back in 2013, KindleGen had other transparent PNG issues.)

Quote:
Originally Posted by Land_Outcast View Post
so I thought to use SVGs (but they aren't allowed by Amazon's lastest format).
It also sounds like you want to have "one file to rule them all", but for this particular problem, you can't.

Similar to equations, there are ways to finagle SVG (with PNG fallback) into the ebook with a lot of elbow grease... but it's usually not worth it. And that comes with its own quirks/bugs (potential duplicate images).

Usually, you just go with the easiest + lowest common denominator, and make sure it works across a wide swathe of devices instead.

If you want to put in the extra work, you'd most likely have to create completely separate books:

- one for EPUB with SVGs and/or transparent PNGs
- one for MOBI with non-transparent bitmap images

Quote:
Originally Posted by Land_Outcast View Post
Does anyone have a suggestion on what to do about it?
And is this for personal use? Or are you trying to sell this ebook?

If you're designing this for something like the MR Library, then no problems. Go with SVG and/or Transparent PNGs in your EPUB. I believe Calibre even converts transparent PNGs to Kindle formats fine.

If going for sale though.... probably strongly recommend against it.

Last edited by Tex2002ans; 05-27-2020 at 10:10 PM.
Tex2002ans is offline   Reply With Quote
Old 05-27-2020, 10:37 PM   #3
Land_Outcast
Enthusiast
Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!
 
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
Thanks for the detailed response, Tex.

These are books which are being digitalized for sale through the major distributors.

I mentioned SVG because some of the books have simple, or not so simple, vector graphics. Most of those which present this issue, though, have bitmap images with transparencies, not vectors.
Quote:
It also sounds like you want to have "one file to rule them all", but for this particular problem, you can't.
Yes, I'm well aware. And I'd love one format to rule them all, but I know most of the time that is being naïve, heh.

Quote:
Usually, you just go with the easiest + lowest common denominator, and make sure it works across a wide swathe of devices instead.
For the time being I've been using GIFs, the result is not hideous, but it is the lowest common denominator, with the usual drawbacks that implies. By the way, I belive they do work ok in most formats, but I'm something of a newcomer in this, so please correct me if I'm wrong in my belief.

I could, realistically, call it a day and just leave it at centered jpg images with white background, no float, no transpanecy… but I like to do things the best they can be done with my current skills (or learn a thing o two and do them better), and the allotment of time for the task in question.

Quote:
Similar to equations, there are ways to finagle SVG (with PNG fallback) into the ebook with a lot of elbow grease... but it's usually not worth it. And that comes with its own quirks/bugs (potential duplicate images).
I thought about using queries (to use a PNG when adequately rendered, otherwise use a GIF), but it would imply a lot of work, and I don't know how well supported they (queries) are across the board.
Land_Outcast is offline   Reply With Quote
Old 05-28-2020, 03:33 PM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Land_Outcast View Post
These are books which are being digitalized for sale through the major distributors.
Then you'll have to be a bit more strict, and lean much more towards safe/"no bugs".

(If there are bugs, there are complaints and books get returned/pulled. And on Amazon, if you get the dreaded KQN [Kindle Quality Notice], sales drop dramatically.)

Quote:
Originally Posted by Land_Outcast View Post
I mentioned SVG because some of the books have simple, or not so simple, vector graphics. Most of those which present this issue, though, have bitmap images with transparencies, not vectors.
Can you show some screenshot examples of the problem-as-you-see-it in ADE?

(And if it's just scaling, just know that ADE's image scaling sucks, but from what I've seen on actual devices [Kobo, Nook, etc.], the scaling is better.)

Quote:
Originally Posted by Land_Outcast View Post
I thought about using queries (to use a PNG when adequately rendered, otherwise use a GIF), but it would imply a lot of work, and I don't know how well supported they (queries) are across the board.
If you want an ebook that works across the board:

PNG with white background (no Alpha/transparency).

For actual "EPUB-only" EPUBs, I think you'd be fine using transparent PNGs, and finagling a little more with some SVGs.

For "EPUB->Kindle" EPUBs, you might want to then use KF8/MOBI Media Queries (found in the Kindle Publishing Guidelines, Appendix D).

The issue with media queries outside of that... they could potentially lead to the "duplicate image" bug. For example, there are a ton of non-standards compliant readers out there (like Moon+ Reader on Android, etc.). So they'll ignore the query, then you'll see BOTH images.

[QUOTE=Land_Outcast;3993490]For the time being I've been using GIFs, the result is not hideous, but it is the lowest common denominator, with the usual drawbacks that implies. By the way, I belive they do work ok in most formats, but I'm something of a newcomer in this, so please correct me if I'm wrong in my belief.

GIF is an antiquated format that needs to be stuck in the dustbin. :P

PNG supersedes GIF in every way (besides animation, but animated GIFs aren't supported in ebooks).

Quote:
Originally Posted by Land_Outcast View Post
I could, realistically, call it a day and just leave it at centered jpg images with white background, no float, no transpanecy… but I like to do things the best they can be done with my current skills (or learn a thing o two and do them better), and the allotment of time for the task in question.
If you show some examples of what you're trying to accomplish, there could be different ways of tackling the issue.
Tex2002ans is offline   Reply With Quote
Old 05-28-2020, 05:52 PM   #5
Land_Outcast
Enthusiast
Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!
 
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
Quote:
Can you show some screenshot examples of the problem-as-you-see-it in ADE?
Scaling is the least of problems, actually. Yes, it looks like shit but that runs for every image format. So, meh.

And for some reason I can't replicate the issue now, but it was showing weird behaviour (stretching the images vertically, turning the alpha into a zebra pattern or into a sort of grey transparency).
Quote:
GIF is an antiquated format that needs to be stuck in the dustbin. :P

PNG supersedes GIF in every way (besides animation, but animated GIFs aren't supported in ebooks).
Yes, I know, but an axe is an axe, gets the job done. Might be ugly and prehistoric, but it works.
Of course I'd rather use the PNG, but I was (am) worried about file support (I'll try to replicate the weird behaviour and share it here).

I'm attaching some samples of where I need to use transparencies.
Attached Thumbnails
Click image for larger version

Name:	FCB_crest.png
Views:	184
Size:	16.8 KB
ID:	179572   Click image for larger version

Name:	Portadilla_lacalle.png
Views:	172
Size:	44.0 KB
ID:	179573   Click image for larger version

Name:	bordes.gif
Views:	181
Size:	162.5 KB
ID:	179574   Click image for larger version

Name:	icono_cap_09.gif
Views:	162
Size:	14.4 KB
ID:	179575   Click image for larger version

Name:	icono cap 01.gif
Views:	167
Size:	2.2 KB
ID:	179576  
Land_Outcast is offline   Reply With Quote
Old 05-28-2020, 08:00 PM   #6
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,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Land_Outcast View Post
But now I see a really poor rendering of PNGs on ADE, so I thought to use SVGs (but they aren't allowed by Amazon's lastest format).
Yes and no. Amazon has seriuous issues with SVG images but some kind of svgs can be displayed with the last version of Kindle Previewer (it seems that Amazon is working on those problems with that kind of image). The .kf8 format can handle any kind of svg, but .KFX only can handle svg made of pure paths. Watch for example the following screenshot:

Click image for larger version

Name:	Image1.png
Views:	197
Size:	142.4 KB
ID:	179579

However your issues will continue because .KFX doesn't accept transparent svgs (because Amazon cheats; the original svg is converted in .jpg).

Click image for larger version

Name:	Image2.png
Views:	193
Size:	162.2 KB
ID:	179580

Below you can check the respective epub with the respective svg image used by me.

Regards
Rubén
Attached Files
File Type: epub Crest.epub (4.5 KB, 177 views)

Last edited by RbnJrg; 05-29-2020 at 09:47 AM.
RbnJrg is offline   Reply With Quote
Old 05-30-2020, 01:58 AM   #7
Land_Outcast
Enthusiast
Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!
 
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
Thanks, Rubén.
Land_Outcast is offline   Reply With Quote
Old 05-30-2020, 02:43 PM   #8
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Land_Outcast View Post
And for some reason I can't replicate the issue now, but it was showing weird behaviour (stretching the images vertically, turning the alpha into a zebra pattern or into a sort of grey transparency).
"Zebra pattern"? Like this?

https://www.mobileread.com/forums/at...7&d=1381013845
https://www.mobileread.com/forums/at...8&d=1381013878

That's my images from a topic in 2013:

"Sony Reader for PC -- not rendering 16-color png"

Are you saving your PNGs in a strange way?

Are you saving as Indexed? (Or the very obscure: "Indexed with Alpha"?)

What image editor are you using?

Quote:
Originally Posted by Land_Outcast View Post
Yes, I know, but an axe is an axe, gets the job done. Might be ugly and prehistoric, but it works.
GIF images are 256 colors max.

"Indexed PNGs" cover that entire use-case (256 colors).

Normal PNGs (Color + Color/Alpha) then take on the entire RGB color range.

On top of that, PNGs compress so much better, because it uses more modern algorithms.

Quote:
Originally Posted by Land_Outcast View Post
Of course I'd rather use the PNG, but I was (am) worried about file support (I'll try to replicate the weird behaviour and share it here).
There's no compatibility issues I know of besides the PNG->JPG conversion that sometimes happens through KindleGen.

Only has potential to get strange when you start going into the edge cases (like 4-bit Indexed PNG).

Note: Another thing you have to look out for is that lots of image editors sometimes embed tons of crap/metadata inside PNGs too. But that can easily be stripped.

Quote:
Originally Posted by Land_Outcast View Post
I'm attaching some samples of where I need to use transparencies.
If all else fails, just PNGs with white background (no Alpha).

Not ideal, yes. Potentially hideous on color backgrounds? Yes. Fully compatible? Yes! :P

And then you just save the transparent source for some future date (or a MobileRead-specific version where you don't have to care about sales).

Last edited by Tex2002ans; 05-30-2020 at 02:48 PM.
Tex2002ans is offline   Reply With Quote
Old 05-30-2020, 05:31 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
if you are doing this for n eBook to sell at Amazon, you have to deal with Mobi and what you want to do won't work with Mobi.
JSWolf is offline   Reply With Quote
Old 05-30-2020, 08:06 PM   #10
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JSWolf View Post
if you are doing this for n eBook to sell at Amazon, you have to deal with Mobi and what you want to do won't work with Mobi.
This was already covered in Post #4.
Tex2002ans is offline   Reply With Quote
Old 05-31-2020, 09:44 AM   #11
Land_Outcast
Enthusiast
Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!Land_Outcast rocks like Gibraltar!
 
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
Similar, the actual problem was on the transparent areas.
Quote:
Originally Posted by Tex2002ans View Post
Are you saving your PNGs in a strange way?

Are you saving as Indexed? (Or the very obscure: "Indexed with Alpha"?)

What image editor are you using?
Nope, nothing strange, nor indexed. And I'm using Photoshop.
Actually, I can't replicate the issue even using the original PNGs which were horridly rendered. I did uninstall and re-install ADE (same version), perhaps it was a software problem.
Quote:
Originally Posted by Tex2002ans View Post
GIF images are 256 colors max.

"Indexed PNGs" cover that entire use-case (256 colors).

Normal PNGs (Color + Color/Alpha) then take on the entire RGB color range.

On top of that, PNGs compress so much better, because it uses more modern algorithms.
I know, I know. Similar but harder stronger faster.
I went for the GIFs because they rendered better than PNGs in ADE at the time (???).
Quote:
Originally Posted by Tex2002ans View Post
If all else fails, just PNGs with white background (no Alpha).

Not ideal, yes. Potentially hideous on color backgrounds? Yes. Fully compatible? Yes! :P

And then you just save the transparent source for some future date (or a MobileRead-specific version where you don't have to care about sales).
Yep; after this exchange I just went with the transparent PNGs.
And thanks!
Quote:
Calibre/Sigil
By the way, I'm enjoying the use of both tools now, specially Sigil's Structure… option and its XHTML split.
Land_Outcast is offline   Reply With Quote
Old 05-31-2020, 01:53 PM   #12
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Land_Outcast View Post
Similar, the actual problem was on the transparent areas.
I'd be interested in seeing the images if you can ever reproduce.

I must admit, I haven't really messed with PNG w/ Alpha ever since my formulas thread.

Quote:
Originally Posted by Land_Outcast View Post
Actually, I can't replicate the issue even using the original PNGs which were horridly rendered. I did uninstall and re-install ADE (same version), perhaps it was a software problem.
It was probably my magic touch.

Quote:
Originally Posted by Land_Outcast View Post
By the way, I'm enjoying the use of both tools now, specially Sigil's Structure… option and its XHTML split.
I personally prefer Sigil, but use both, and they each have their advantages.
Tex2002ans is offline   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
Transparency DrewBoyd Kindle Formats 8 05-24-2016 07:33 AM


All times are GMT -4. The time now is 06:50 PM.


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