08-28-2023, 07:55 AM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2023
Location: New Hampshire
Device: none
|
Dealing with no transparency
I have a PNG where a corner of it is transparent. (It's a picture of a newspaper where the article text is removed, but the headline and photo remain, creating an L-shaped opaque area and a rectangular transparent area.)
I copied the epub to Kindle, and it shows a block of white where it should be transparent. I've concluded that Kindle doesn't support transparency, even though they started supporting epubs. I'm wondering if I can work around the issue by having multiple images where the transparent area is either white, sepia, green, or black and choose which to display based on the background color the user has chosen for their Reader. If the background color is white (or close to it), display the white version. If the background color is sepia (or close to it), display the sepia version. Etc. Is that possible? How would I do that? Or would Kindle actually display the transparency correctly if I set up my epub (v3) differently? Note: Another use case is for scene break images—irregular shapes that get set in a white rectangle instead of a transparent background. |
08-28-2023, 09:53 AM | #2 |
Reading till the spring
Posts: 12,532
Karma: 94058919
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Transparency isn't possible on most ereaders.
Also epubs of any kind don't work on Kindle. Either you or Amazon have to convert them. |
Advert | |
|
08-28-2023, 10:42 AM | #3 | ||
Member
Posts: 13
Karma: 10
Join Date: Aug 2023
Location: New Hampshire
Device: none
|
Quote:
Do you think there's a way to work around it with my idea of multiple images and selecting on based on the eReader's background color? Quote:
|
||
08-28-2023, 11:29 AM | #4 | |
A Hairy Wizard
Posts: 3,241
Karma: 19222221
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
From Kindle Guidelines: Code:
4. Supported input formats: Kindle devices and reading applications do
not support TIFF, multi-frame GIFs, or images with transparent areas.
When images are provided with transparent backgrounds, we convert
the transparent background to white.
However, I think that may be over thinking things a bit… not to mention exploding the file size of your ePub. Just let Amazon convert it into a white background. If anyone complains point them at Amazon. Customer complaints is the only way to get Amazon to do/fix anything. Last edited by Turtle91; 08-28-2023 at 11:34 AM. |
|
08-28-2023, 12:22 PM | #5 |
Resident Curmudgeon
Posts: 76,977
Karma: 138588794
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I do have an idea for something to try. Convert the ePub to KF8 using calibre. Then load the Kf8 in the editor and load the original image over the one in the KF8 and give it a try on your Kindle. You've nothing to lose by trying.
|
Advert | |
|
08-28-2023, 01:40 PM | #6 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2023
Location: New Hampshire
Device: none
|
I'm willing to try that. However, I don't see KF8 as an option in Calibre's conversion window.
|
08-28-2023, 01:59 PM | #7 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2023
Location: New Hampshire
Device: none
|
I'm also not sure what I would do with a KF8 file. SendToKindle doesn't include it in it's supported file types:
Supported File Types: PDF, DOC, DOCX, TXT, RTF, HTM, HTML, PNG, GIF, JPG, JPEG, BMP, EPUB |
08-28-2023, 02:51 PM | #8 |
A Hairy Wizard
Posts: 3,241
Karma: 19222221
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Try azw3
|
08-28-2023, 03:01 PM | #9 |
Member
Posts: 13
Karma: 10
Join Date: Aug 2023
Location: New Hampshire
Device: none
|
Please forgive my noobiness. Some googling showed me that KF8 == AZW3.
I converted the file to AZW3 and tried to replace the file, but the "Replace" option in Calibre is missing. (See screenshot.) |
08-28-2023, 03:28 PM | #10 |
Resident Curmudgeon
Posts: 76,977
Karma: 138588794
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
08-28-2023, 03:29 PM | #11 |
Resident Curmudgeon
Posts: 76,977
Karma: 138588794
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You wouldn't send to Kindle. You would have to side-load via USB in order to do the testing. And if it works, you still cannot send-to-Kindle.
|
08-28-2023, 04:08 PM | #12 | |
Bibliophagist
Posts: 41,328
Karma: 158182190
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
08-29-2023, 08:29 AM | #13 | ||
Member
Posts: 13
Karma: 10
Join Date: Aug 2023
Location: New Hampshire
Device: none
|
Thanks for bearing with me.
Although the "Replace" option was missing when editing the AZW3 file, I was able to replace the image when editing the epub. Then I converted the epub to the AZW3 file, and saw in Calibre that the transparency was working. I converted it back to an epub and uploaded that to my Kindle app using SendToKindle. Unfortunately, the app showed that image with opaque white where there should have been transparency. That fits with what Turtle91 quoted from the Kindle Guidelines. Quote:
As it happens, I'm testing this to give out to a couple hundred people, and they're not all going to side-load via USB to get the book. So, that's not really an option. Thanks for the idea, anyway. Quote:
I read in another thread that some eReaders don't support media queries. They treat every MQ as matching, so all the code in each MQ would be applied. In this case, every variant of the image would be displayed. Maybe javascript would work in place of media queries? |
||
08-31-2023, 02:35 AM | #14 |
Enthusiast
Posts: 33
Karma: 2538
Join Date: Aug 2023
Location: NW US
Device: none
|
Perhaps something similar could be done for your goal, as was utilized at this MobileRead link where they had an upside down L-shaped image and the text wrapped around it all nicely:
Another MR article |
09-14-2023, 02:18 AM | #15 |
Guru
Posts: 677
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
If your target is Kindle, PNGs aren't preserved when converted to a Kindle format. At least, not MOBI/KF7 or AZW/KF8. Don't know about KFX.
I unpacked the kindle formats made by Kindlegen and all PNGs had been converted to either GIF or JPG. And no transparency, even in the GIF format which does support it. So if I have a PNG, or an image that is basically linework, diagrams, text, or cartoonish art, I usually convert it to GIF myself so I can optimise it. Kindlegen passes GIFs through to the Kindle format unchanged (so far). I use Irfanview (Windows) for this, which can do stuff like resize, sharpen, change colour depth, edit the palette. And also convert transparency to white. |
Tags |
background color, epub, image, kindle, transparency |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dealing with updates | Renate | Onyx Boox | 3 | 11-17-2022 11:18 AM |
About transparency | Land_Outcast | ePub | 11 | 05-31-2020 02:53 PM |
Transparency | DrewBoyd | Kindle Formats | 8 | 05-24-2016 08:33 AM |
Dealing with Covers | Paula-59 | Workshop | 9 | 03-15-2016 08:57 PM |