View Full Version : Transparent images


Iznogood
12-31-2012, 07:41 AM
I'm currently working on a book that shall have a picture on the front page together with some text. The front page shall be an svg image, with a background color that fills the entire "page", and text and an image on top of the background.

Some parts of the image shall have the same color as the background, and I would like to make these areas transparent in the image. iBooks honours the transparent part of the image and handles this correctly, while bluefire displays the transparent areas as white.

Is this another bug on ADEs part, or is transparency not supported by the epub specifications? I can of course take the easy route and set the background color directly into the png image, but I don't like that solution. After all, this is what transparency is for!

dgatwood
12-31-2012, 10:39 AM
This sounds like what would happen if the programmer incorrectly set the opaque flag on the UIImageView and failed to set its background color to that of the page. Oops.

The EPUB spec requires you to support the image formats, and it does not explicitly exclude transparency, so I would say supporting image transparency is a required part of the spec. Out of curiosity, though, why don't you just fill those areas in the image with the right color?

Also, does this fail with ADE on the desktop, or just Bluefire? I don't think any of the ADE-compatible readers in iOS actually use the ADE rendering code; they all render content differently from one another, and the rendering barely resembles ADE on other platforms.

Iznogood
12-31-2012, 11:29 AM
This sounds like what would happen if the programmer incorrectly set the opaque flag on the UIImageView and failed to set its background color to that of the page. Oops.
"The programmer" as in the one who makes the rendering machine or the reader app? Or "the programmer" as in me making an error when removing the background from the image?

Out of curiosity, though, why don't you just fill those areas in the image with the right color?
If tomorrow I change my mind and want to make the background green instead of blue, or tweak the nuance of the color or (heaven forbid!) even make a gradient as background, it's good to have the background of the image transparent instead of solid color. Changing and tweaking is easier. The only reliable way I have found to achieve this is to vectorize the image too and embed it in the svg file.

Also, does this fail with ADE on the desktop, or just Bluefire?

This happens with the ADE 2.0 desktop utility too, and with bluefire. It works in iBooks. I have not yet tried Marvin since my ipad has iOS 4.2 and Marvin requires iOS 5

dgatwood
12-31-2012, 09:38 PM
"The programmer" as in the one who makes the rendering machine or the reader app? Or "the programmer" as in me making an error when removing the background from the image?


As in the person/people who wrote the reader app.




This happens with the ADE 2.0 desktop utility too, and with bluefire. It works in iBooks. I have not yet tried Marvin since my ipad has iOS 4.2 and Marvin requires iOS 5

Sounds like it's an ADE bug, then.