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 136395 - pixbuf_from_file_at_size variant not preserving e the aspect ratio
pixbuf_from_file_at_size variant not preserving e the aspect ratio
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-03-06 18:18 UTC by Dominic Lachowicz
Modified: 2010-07-10 04:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to implement proposed functionality (2.65 KB, patch)
2004-03-06 18:19 UTC, Dominic Lachowicz
none Details | Review
revised patch should look something like this. please feel free to rename it as i couldn't think of a good name < 128 characters for it (5.07 KB, patch)
2004-03-06 19:00 UTC, Dominic Lachowicz
none Details | Review

Description Dominic Lachowicz 2004-03-06 18:18:57 UTC
It's probably bogus behavior to always preserve the aspect ratio in
'from_file_at_size()', specifically because you asked for a pixbuf at a
particular width and height. The current behavior blocks bug #105316, which
is why I had originally implemented the patch.

Please find attached a new patch that optionally preserves the aspect
ratio. Please find it in your hearts to commit this or something like it
before GTK 2.4 :)
Comment 1 Dominic Lachowicz 2004-03-06 18:19:31 UTC
Created attachment 25269 [details] [review]
patch to implement proposed functionality
Comment 2 Owen Taylor 2004-03-06 18:30:52 UTC
Sorry, to late for 2.4, we'll have to add another variant for 2.6. :-(
Comment 3 Owen Taylor 2004-03-06 18:31:58 UTC
(Note that pixbuf_new_from_file_at_size is just convenience
API so there's not reason for this to block any other bug)
Comment 4 Dominic Lachowicz 2004-03-06 18:59:27 UTC
no, i just thought that it would've been nice to have this be builtin
to gtk+ 2.4. anyway, you're right - this is implementable outside of
gtk+ proper. i'll attach a new patch for gtk+ 2.6 here in a little while.
Comment 5 Dominic Lachowicz 2004-03-06 19:00:44 UTC
Created attachment 25270 [details] [review]
revised patch should look something like this. please feel free to rename it as i couldn't think of a good name < 128 characters for it
Comment 6 Matthias Clasen 2004-08-26 05:36:43 UTC
Thu Aug 26 01:23:16 2004  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf-core.h: 
	* gdk-pixbuf.symbols: 
	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file_at_scale): 
	Add gdk_pixbuf_new_from_file_at_scale(), which is just
	like gdk_pixbuf_new_from_file_at_size(), but optionally
	ignores the aspect ratio.  (#136395, Dom  Lachowicz)