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 581484 - "area-updated" signal for GdkPixbufLoader is emitted with incorrect parameters
"area-updated" signal for GdkPixbufLoader is emitted with incorrect parameters
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2009-05-05 15:17 UTC by Andrey Tsyvarev
Modified: 2016-12-29 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
program for verify parameters of "area-updated" signal for loaders (5.58 KB, text/plain)
2009-05-05 15:20 UTC, Andrey Tsyvarev
Details
"ico"-image under test (6.76 KB, image/ico)
2009-05-05 15:33 UTC, Andrey Tsyvarev
Details
program for verify "area-updated" parameter when loading animation (7.66 KB, text/plain)
2009-05-05 15:37 UTC, Andrey Tsyvarev
Details
gif-animation under test (34.65 KB, image/gif)
2009-05-05 15:44 UTC, Andrey Tsyvarev
Details

Description Andrey Tsyvarev 2009-05-05 15:17:26 UTC
For some image types "area-updated" signal of GdkPixbufLoader is emmited with incorrect parameters: image may be modified outside of the area defined by 'x', 'y', 'width' and 'height'.

This situation observed on "ico", "gif" and "ani" image formats;
for "bmp", "png" and "jpeg" images everything seems to be correct.
Comment 1 Andrey Tsyvarev 2009-05-05 15:20:35 UTC
Created attachment 134029 [details]
program for verify parameters of "area-updated" signal for loaders
Comment 2 Andrey Tsyvarev 2009-05-05 15:33:55 UTC
Created attachment 134031 [details]
"ico"-image under test

Incorrect parameters of "area-updated" signal shows up on this ico-image.

According to the code of "ico"-loader, it seems that problem is in transposed format of image, when y-coordinate is taken from opposite side than in normal format.
If one replace 'y' parameter as in this code

if(y != 0) y = gdk_pixbuf_get_height(pixbuf) - y;

everything became correct for the given image.
Comment 3 Andrey Tsyvarev 2009-05-05 15:37:24 UTC
Created attachment 134032 [details]
program for verify "area-updated" parameter when loading animation
Comment 4 Andrey Tsyvarev 2009-05-05 15:44:42 UTC
Created attachment 134038 [details]
gif-animation under test

for this GIF-animated image problem with "are-updated" signal parameters also arises.

Simple

height++ 

fix this inconsistent, but origin of the problem is not obviuos.
Comment 5 Bastien Nocera 2016-12-19 19:06:19 UTC
Could you please integrate the tests into the test suite? This would make it easier to fix the problem(s).
Comment 6 Bastien Nocera 2016-12-19 19:21:31 UTC
I've realised that those are from 7 years ago (nearly 8), so I'll try and do that myself, no worries ;)
Comment 7 Bastien Nocera 2016-12-29 16:16:32 UTC
This is all fixed in master, and I integrated your tests in the test suite.

ICO fix at: ebcd488cc433be8bc00ccb8e820597de4388108e
GIF fix at: a6b07899b11b10647168c5e35a9d6c809c38a5d5