Details

[Home]

Issue of the Implementation # S0659

Brief

"area-updated" signal for GdkPixbufLoader is emitted with incorrect parameters

Detailed Description

The conditions when the signal is emitted are described in the documentation as follows:
This signal is emitted when a significant area of the image being loaded has been updated.

Moreover, the "Description" section states:
The last signal, "area_updated" gets called every time a region is updated.

The parameters are described as follows:
x : X offset of upper-left corner of the updated area.
y : Y offset of upper-left corner of the updated area.
width : Width of updated area.
height : Height of updated area.

However it is possible that the image will be modified not only in the area defined by x, y, width and height parameters.

The problem occurs when images in "ico" format are loaded. The "y" parameter probably gets wrong value when the signal is generated, although it looks like everything becomes correct if one changes "y" as follows:

if(y != 0) y = pixbuf_height - y;

The parameters of the emitted signal are correct for "bmp", "png" and "jpeg" images.

The same problem takes place when some other types of the animated images are loaded. Namely,

  • The source of the problem is probably the same for "ani" images as for "ico".
  • The root of the issue for "gif" images is not clear, but the parameters emitted are incorrect too.

This example demonstrates emission of the signal with the erroneous parameters for "ico", "ani" and "gif" images.

Problem location(s) in the standard

Gdk-pixbuf 2.6.2 API Reference, GdkPixbufLoader

Component

gtk-gdk-pixbuf 2.6.2 or later

Accepted

Gnome Bugzilla 581484

[Home]