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 779135 - pixbuf: Don't assume the GdkPixbuf's rowstride to be width * bytes per pixel
pixbuf: Don't assume the GdkPixbuf's rowstride to be width * bytes per pixel
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks: 690255
 
 
Reported: 2017-02-23 14:09 UTC by Debarshi Ray
Modified: 2017-11-23 16:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program (1.19 KB, text/plain)
2017-02-23 14:09 UTC, Debarshi Ray
  Details
Test image (130.33 KB, image/jpeg)
2017-02-23 14:10 UTC, Debarshi Ray
  Details
operations/external/pixbuf: Clean up the prepare implementation (1.24 KB, patch)
2017-02-23 14:26 UTC, Debarshi Ray
committed Details | Review
operations/external/pixbuf: Use a faster API to read the pixels (1.66 KB, patch)
2017-02-23 14:26 UTC, Debarshi Ray
committed Details | Review
operations/external/pixbuf: Use the GdkPixbuf's rowstride (1.22 KB, patch)
2017-02-23 14:26 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-02-23 14:09:53 UTC
Created attachment 346571 [details]
Test program

The GdkPixbuf's rowstride may not necessarily be width * bytes per pixel. We should query the value from the GdkPixbuf itself using gdk_pixbuf_get_rowstride [1].

See the attached test case for an example of a bug - the output file doesn't look like the input.

[1] https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-rowstride
Comment 1 Debarshi Ray 2017-02-23 14:10:19 UTC
Created attachment 346572 [details]
Test image
Comment 2 Debarshi Ray 2017-02-23 14:26:00 UTC
Created attachment 346573 [details] [review]
operations/external/pixbuf: Clean up the prepare implementation
Comment 3 Debarshi Ray 2017-02-23 14:26:22 UTC
Created attachment 346574 [details] [review]
operations/external/pixbuf: Use a faster API to read the pixels
Comment 4 Debarshi Ray 2017-02-23 14:26:41 UTC
Created attachment 346575 [details] [review]
operations/external/pixbuf: Use the GdkPixbuf's rowstride
Comment 5 Debarshi Ray 2017-02-23 14:31:18 UTC
Sorry, misfiled.
Comment 6 Debarshi Ray 2017-02-24 17:50:53 UTC
From #gegl on GIMPNet:
<pippin> rishi: please push your gdkpixbuf related fixes for bug 779135