After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309469 - No wrappers for GdkPixdata
No wrappers for GdkPixdata
Status: RESOLVED WONTFIX
Product: pygtk
Classification: Bindings
Component: gtk
2.5.x/2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-04 18:51 UTC by Tommi Komulainen
Modified: 2006-07-04 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tommi Komulainen 2005-07-04 18:51:25 UTC
There doesn't appear to be a wrapper for gdk_pixdata_deserialize making it
fairly difficult to (de)serialize pixbufs.
Comment 1 Gustavo Carneiro 2005-07-10 12:08:40 UTC
There are no wrappers for GdkPixdata, period, not just deserialize.  Changing
the title...
Comment 2 James Henstridge 2005-07-11 02:03:34 UTC
Note that the pixdata routines are not actually that useful from Python.

There are two types of pixdata blocks you can create with two different uses:
 1) uncompressed pixel data.  This is used in libraries like GTK.  The
    GdkPixbufs created from such pixdata use the data from the readonly
    section of the executable, which is shared between all apps using the
    library.
 2) compressed pixel data.  The created GdkPixbufs copy the pixel data when
    decompressing it, but the source data gets loaded along with the
    executable as readonly data.  Can be useful for toy programs where you
    only want to have a single file.

With a Python program, any strings in a .py file are going to be copied when the
module is loaded, and hence not shared.  This kills off the benefit of (1). 
Case (2) is also less relevant to Python programs since it is very common for
them to come as more than one file anyway.
Comment 3 Gustavo Carneiro 2005-07-11 11:39:17 UTC
well, I'm convinced we don't need this.  Tommi, can I close this WONTFIX?  In
any case, there's no time for 2.8 API freeze...
Comment 4 Tommi Komulainen 2005-08-22 19:19:00 UTC
You might also want to (de)serialize pixbufs to disk, socket, whatnot.  (I was
trying to access f-spot database where for whatever reason thumbnails are in
serialized format.)  There are more cases where you can have image data in
RGB(A) format ready to be used as GdkPixbuf pixel data, but in python there
doesn't seem to be any way to do that.

The memory/performance benefits might not be as relevant in Python, I was more
concerned about not having (de)serialization support at all.
Comment 5 Olav Vitters 2006-07-04 11:27:34 UTC
Reopening as comment was made.
Comment 6 Gustavo Carneiro 2006-07-04 13:44:52 UTC
GdkPixbuf has plenty of serialization support without GdkPixData: PNG, GIF, BMP, etc.  f-spot is the one that needs to be fixed to not save files in a non-standard image format for no good reason; in fact, saving in PNG or JPEG would even save lots of disk space.   Unless there is a good argument for GdkPixData (i have no idea why this C API was ever created), I'd rather WONTFIX this.