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 603706 - Add ability to dump pixel data as an hex byte array to gdk_pixdata_to_csource()
Add ability to dump pixel data as an hex byte array to gdk_pixdata_to_csource()
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2009-12-03 16:40 UTC by Xavi Artigas
Modified: 2014-10-21 17:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch over version 2.19.2 (10.09 KB, patch)
2009-12-03 16:40 UTC, Xavi Artigas
rejected Details | Review

Description Xavi Artigas 2009-12-03 16:40:38 UTC
Created attachment 149016 [details] [review]
Patch over version 2.19.2

gdk_pixdata_to_csource() and the associated command-line tool dump generate C code consisting of a char * initialised with a string.
The Microsoft Visual Studio C Compiler 2008 (and probably previous versions) cannot cope with strings longer than 64Kb.
Therefore, this patch adds the option to initialise the pixel data with a byte array, which makes everyone happy.
The previous behaviour is kept as default so as to not modify existing applications relying on it, but it might be worth considering setting the new behaviour (byte arrays instead of strings) the default.
Comment 1 Bastien Nocera 2014-10-21 17:37:37 UTC
Review of attachment 149016 [details] [review]:

Marking this as rejected. I've marked the GdkPixdata API as deprecated now, you should use GResource instead.
Comment 2 Bastien Nocera 2014-10-21 17:38:01 UTC
commit 48d76fb7f2d059013f5781b199245274998f05c9
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Oct 21 19:24:11 2014 +0200

    lib: Deprecate GdkPixdata
    
    GdkPixdata has a number of problems, including:
    - it doesn't use the original files, losing metadata
    - its RLE compression is ineffecient, even more so for lossy formats
    - the way it's implemented doesn't support data > 64 kB on Windows
      (See https://bugzilla.gnome.org/show_bug.cgi?id=603706)