[Pixman] sRGB scaling without alpha channel?

Søren Sandmann soren.sandmann at gmail.com
Fri Mar 5 23:38:52 UTC 2021


There isn't really any guide. What I'd suggest is grepping the source
code for "sRGB" and then adding support for your new
PIXMAN_r8g8b8_sRGB format in all those places. Aside from adding the
format to the header file, the main work would be implementing the
accessor functions in pixman-access.c.


On Fri, Mar 5, 2021 at 11:00 AM Claude Heiland-Allen <claude at mathr.co.uk> wrote:
> Hi Søren,
> On 04/03/2021 19:55, Søren Sandmann wrote:
> > You are right that pixman doesn't have support for sRGB formats
> > without an alpha channel. It would make sense to add such support (and
> > it should be straightforward to do so).
> Is there a guide for this kind of work?  For example a patch series
> wherein a similar format was added?  I could try to implement it, but
> I'm not familiar with pixman code.
> > You might consider biting the bullet and just use an alpha channel.
> > Usually a8r8g8b8 images are faster to work with than r8g8b8 anyway
> > since they are aligned at 32 bits and tend to have more optimized fast
> > paths available for them.
> That is something to think about longer term for my project, but for the
> short term the only thing I'd need an alpha channel for would be this
> sRGB gamma-correct downscaling.  I'd rather spend my development time to
> try to contribute sRGB-without-alpha to pixman as I'm sure others would
> find it useful too.
> Claude
> --
> https://mathr.co.uk
> _______________________________________________
> Pixman mailing list
> Pixman at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pixman

More information about the Pixman mailing list