Summary: | Support for writing to GdkPixbufs. | ||
---|---|---|---|
Product: | cairo | Reporter: | Björn Lindqvist <bjourne> |
Component: | general | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED WONTFIX | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | bjourne |
Version: | 1.5.1 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Björn Lindqvist
2007-09-11 13:03:10 UTC
Problem is, pixbufs use non-premultiplied alpha while cairo uses premultiplied. We don't have the drawing code to deal with non-premultiplied. The only way to draw to pixbufs is to convert back and forth. This all may change in the future when we switch to a jitblt pixman. But not soon. I understand, that's a good reason. But if cairo can not support GdkPixbufs natively, I think it should still be able to export and import them. Cairo seem to be a superior alternative to GDK, but it is very hard to port existing API:s using GdkPixbuf to Cairo because you want to keep compatibility. For example, GtkSelectionData that has the methods get_pixbuf() and set_pixbuf() could use an cairo ImageSurface internally and then use the import and export functions. I know that it is not that hard to write the functions yourself, but it would really help if cairo had some highly optimized and screamingly fast functions for it. But hasn't the precedent been set for GDK to create cairo surfaces from Pixbufs. This seems to be the sensible approach to leave cairo as the low-level library for interfacing with the various target devices and leave GdkPixbuf as the library for manipulating pixel data (which should mirror cairo and provide pre-multiplied ARGB if wants to ultimately push pixels to hardware). Closing as WONTFIX is a purely personal opinion from a cairo PoV. I suggest to raise the topic once again on the various gnome developer lists and the cairo mailing list to encourage a resolution to this long standing issue. Yup, that is more sensible. Especially since GdkPixbufs unpadded RGB and RGBA formats are quite uncommon. But the problem is still there and it is still hard to integrate cairo with gdk. Unfortunately no one seems to be willing to work on any solution. :( |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.