views:

35

answers:

1

After create a Pycairo context and surface (ImageSurface) I get a diferent export results if I get directly from surface buffer

surface.get_data()

or from PNG export method

surface.write_to_png()

The context antialias flag is obviously the same and, yes, the get_data method result has antialiasing, but with much poorer quality. Why?

Thanks.

A: 

I answer myself, Cairo uses premultiplied color (ARGB) and GTK only it's able to manage true color (RGBA). Use it directly result in a display with gray fridges

I could make the conversion manually, losing a lot of performace, obviously.

mkotechno