[Pixman] sRGB scaling without alpha channel?

Claude Heiland-Allen claude at mathr.co.uk
Thu Mar 4 10:33:58 UTC 2021


Hi,

I have some image downscaling code [1] using Pixman that currently works 
in regular RGB.  I would like instead to do gamma-correct sRGB 
downscaling, but I only see an sRGB-with-alpha format in the source code 
[2].  Is it possible to use this with sRGB-without-alpha data somehow?  
I would like to avoid having to add a placeholder alpha channel before 
downscaling only to remove it afterwards.

[1] 
https://code.mathr.co.uk/kalles-fraktaler-2/blob/e7ead006bb8de5b80732ad71794455395f2bba67:/fraktal_sft/scale_bitmap.cpp#l48
[2] 
https://gitlab.freedesktop.org/pixman/pixman/-/blob/d93ec5713821106df6d57952dcf169308c7c4f0e/pixman/pixman-access.c#L1406-1411

Thanks,


Claude
-- 
https://mathr.co.uk



More information about the Pixman mailing list