Transparent png gets white background in epub

Learn / Forums / EPUB and eBook / Transparent png gets white background in epub

Viewing 6 reply threads
  • Author
    Posts
    • #111520

      When I export a reflowable epub from InDesign, the transparent png image has a white background in the epub.

      In InDesign I placed a blue rectangle behind the png to confirm that the png is transparent. Then exported to reflowable epub, opened the epub in Kindle Viewer 3, and set the viewing color to sepia. The png appears with a white background and the blue rectangle does not appear.

      What would make a transparent png render with a white background when exported to epub?

    • #111524
      Aaron Troia
      Participant

      Hey Mark,

      That doesn’t surprise me from InDesign Export, I’m guessing that it’s probably flattening the PNG’s and replacing the transparency with white background when you export the file. Have you tried unzipping the ePub, replacing the PNG files and re-zipping it?

      Aaron

    • #111528

      Great suggestion. I unzipped the ePub and discovered jpeg images instead of png. No wonder they’re not transparent.

      What causes InDesign to convert images from png to jpeg when exporting to ePub?

    • #111530
      Aaron Troia
      Participant

      Off the top of my head, I’m guessing it’s simply an easy way to keep the file size small. Now I’m wondering how it decides what PNGs to convert and which it doesn’t, I have some that export certain PNGs fine (not sure if the ones I’m thinking of have transparency though), so I’m wondering if there is a file size limit or something on export that determines which stay PNG and which are converted to JPG.

    • #111531

      I had incorrectly specified jpeg conversion on the epub & html section of the Object Properties. Changing to png results in png export as intended. Even when I unzip the epub, replace the png with a transparent one, and epubpack to reassemble to epub, the image displays in Kindle Previewer with a white background.

      Any other ideas?

    • #111532
      Aaron Troia
      Participant

      Oh good, I’m glad you figured out why it was converting your PNGs to JPGs. Some of those export options can drive you crazy when you can’t figure out why its exporting differently than what you’re expecting.

      Now Amazon is a different story. The support for transparencies in KF8 has been one that is driving a lot of ebook developers crazy in the #eprdctn group on Twitter. It has been supported it in the past and then one day it seems like wasn’t and there was no real heads up or reasoning why from Amazon (that I’ve seen or heard of). Unfortunately there is no fix for it, again, that I’ve seen or heard of :(

    • #111534

      OK. Thanks.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.
>