guetzli icon indicating copy to clipboard operation
guetzli copied to clipboard

why it will change the color

Open trymoremore opened this issue 8 years ago • 7 comments

the color of background changed from white to black. how to prevent it?

trymoremore avatar Apr 11 '17 09:04 trymoremore

is the white background actually transparant? Guetzli doesn't support images with transparency.

romainmenke avatar Apr 11 '17 09:04 romainmenke

@romainmenke thank you very much. and whether there is no way to compression images with transparency in guetzli?

trymoremore avatar Apr 11 '17 10:04 trymoremore

There is no transparency support in JPEGs as they are supported by most viewers.

robryk avatar Apr 11 '17 10:04 robryk

Is it at least possible to create a setting which allows changing the transparency flattening color (say, from the default black to white instead)?

Algae666 avatar Apr 18 '17 21:04 Algae666

When I changed the BlendOnBlack function in guetzli.cc to this:

inline uint8_t BlendOnWhite(const uint8_t val, const uint8_t alpha) { if (alpha < 1) return 255 - ((static_cast(val) * static_cast(alpha) + 128) / 255); return val; }

I got my source image on white background (this is for an image with transparency either fully on or fully off... if there were some blending at the edges, this would probably not suffice).

Algae666 avatar Apr 21 '17 21:04 Algae666

Hi there,

Is there any intention to allow alpha channel support/preservation (eg correlation from the original image to the prospective target image) for *.pngs in the future?

Thanks!

LongBu avatar Apr 26 '17 18:04 LongBu

Please modify Guetzli to use white color for flattening instead of black. Black has no use in any circumstances.

istvan-ujjmeszaros avatar Mar 02 '20 04:03 istvan-ujjmeszaros