freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] ouch! (burned by premultiplication)


From: Werner LEMBERG
Subject: Re: [ft-devel] ouch! (burned by premultiplication)
Date: Wed, 23 May 2018 07:35:57 +0200 (CEST)

> I cannot believe it.
> http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/sfnt/pngshim.c#n52
> 
> Using premultiplied BGRA is a very bad decision.  [...]

Well, have a look at

  https://docs.microsoft.com/en-us/typography/opentype/spec/cbdt

  [...] The color channels represent pre-multiplied color and are
  encoded colors in the sRGB colorspace.  [...]

In other words, the code in `pngshim.c' is not arbitrary.

> Please introduce FT_PIXEL_MODE_RGBA without premultiplication.

Given that color bitmaps in the CBDT table use pre-multiplied colors I
don't think we should use a different scheme for the default handling
of color layers.  It's up to the client to do it a different way.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]