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 579003 - Need pixbuf orientation available on GdkPixbufLoader "size-prepared" signal
Need pixbuf orientation available on GdkPixbufLoader "size-prepared" signal
Status: RESOLVED OBSOLETE
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-04-15 01:55 UTC by Marina Zhurakhinskaya
Modified: 2018-05-22 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marina Zhurakhinskaya 2009-04-15 01:55:32 UTC
It would be useful to make pixbuf orientation available by the time GdkPixbufLoader "size-prepared" signal is emitted, so that the scaled size for the pixbuf can be determined correctly given the available width and height.

It is currently not available from the pixbuf returned by  gdk_pixbuf_loader_get_pixbuf() at that time of the signal or from any function of the GdkPixbufLoader itself.

The workaround I am using now is loading a scaled image with the default orientation, then calling gdk_pixbuf_apply_embedded_orientation() for it, checking if the width of the pixbuf returned by that function is different from the width of the original pixbuf, and if it is, reloading the scaled image with the available dimensions reversed, and calling gdk_pixbuf_apply_embedded_orientation() on it.

There are a few possibilities, including making related functions available for the pixbuf returned by the GdkPixbufLoader at the time or having the GdkPixbufLoader itself have a function to get or apply embedded orientation before the pixbuf is actually loaded. Since getting embedded orientation can return multiple values the same way "orientation" option for gdk_pixbuf_get_option() returns multiple values, it might be useful to just have a function that returns a boolean indicating if rotation will be necessary when embedded orientation is applied.
Comment 1 Michael Chudobiak 2009-09-25 19:34:22 UTC
Yes, the current orientation tag handling is sub-optimal for progressive loaders.

I would suggest that the pixbuf loaders (jpg and tif) should ALWAYS respect the orientation tags, and that gdk_pixbuf_apply_embedded_orientation should die (that is, be deprecated and modified to simply to return the original pixbuf).

I have never heard a compelling reason to ignore the orientation tag.

I'm not in a position to offer any code, however...


- Mike
Comment 2 GNOME Infrastructure Team 2018-05-22 13:10:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/21.