Sorry, forgot one comment,

On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote:
> +static void line_fixup_rgb2bgr(uint8_t *line, unsigned width)
> +{
> +    for (; width; --width) {
> +        std::swap(line[0], line[2]);
> +        line += 3;
> +    }
> +}
> +
> +size_t PngCoder::convert_to_dib(uint8_t *out_buf, const uint8_t *data, 
> size_t size)
> +{
[snip]
> +    case PNG_COLOR_TYPE_RGB:
> +        line_fixup = line_fixup_rgb2bgr;
> +        out_bits = 24;
> +        break;
> +    case PNG_COLOR_TYPE_RGB_ALPHA:
> +        line_fixup = line_fixup_rgb2bgr;
> +        out_bits = 24;
> +        png_set_strip_alpha(png);
> +        break;

Isn't line_fixup_rgb2bgr doing the same as png_set_bgr?

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to