[FFmpeg-devel] [PATCH]Support cmyk in tiff

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon May 5 14:34:42 CEST 2014


On 5/4/2014 9:00 PM, Carl Eugen Hoyos wrote:
> +        for (i = 0; i < s->height; i++) {
> +            for (j = 0; j < s->width; j++) {
> +                int k =  255 - dst[4 * j + 3];
> +                int r = (255 - dst[4 * j    ]) * k;
> +                int g = (255 - dst[4 * j + 1]) * k;
> +                int b = (255 - dst[4 * j + 2]) * k;
> +                dst[4 * j    ] = r * 257 >> 16;
> +                dst[4 * j + 1] = g * 257 >> 16;
> +                dst[4 * j + 2] = b * 257 >> 16;
> +                dst[4 * j + 3] = 255;
> +            }

I'm not keen on duplicating CMYK colorspace conversion code in a bunch of places.


More information about the ffmpeg-devel mailing list