Bug 13489 - UIImage.Scale is not using @2x automatically and leaks
Summary: UIImage.Scale is not using @2x automatically and leaks
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.9.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-07-25 18:44 UTC by Gleb
Modified: 2013-07-29 18:36 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Gleb 2013-07-25 18:44:30 UTC
After the newest update the UIImage.Scale method stops using @2x automatically when necessary. Moreover it started causing huge memory leaks. I have completely izolated leaking code and it is the only one method - UIImage.Scale. 

GC options: tried all, leaks everywhere. 

All this behaviour started with the newest update to monotouch 3.2 and xamarin 4.0.10 build 7.
Comment 1 Gleb 2013-07-25 18:58:38 UTC
Here is the programm info

Xamarin Studio
Version 4.0.10 (build 7)
Installation UUID: b5325780-5207-493b-a915-dac47ddbacfd
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (
	Package version: 302000000

Apple Developer Tools
Xcode 4.6.2 (2067.2)
Build 4H1003

Xamarin.Mac: Not Installed

Version: (Indie Edition)
Hash: c9f7659
Build date: 2013-18-07 21:36:03-0400

Not Installed

Build Information
Release ID: 400100007
Git revision: f324e2154ee86ae1b6b8483392eddbf418e6381b
Build date: 2013-07-20 06:23:58+0000
Xamarin addins: fe4f180e2386eafc00087ef68c3a580cff4a2592

Operating System
Mac OS X 10.8.3
Darwin MacBook-Pro-admin.local 12.3.0 Darwin Kernel Version 12.3.0
    Sun Jan  6 22:37:10 PST 2013
    root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Comment 2 Gleb 2013-07-25 19:24:12 UTC
One more thing. Blame it with leaks were too early I suppose, can't reproduce it now. But surely it lacks the ability to understand @2x images without specifying the scaling factor manually.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-07-29 18:36:35 UTC
UIImage.Scale(SizeF) was modified to not use the device scale factor (it didn't use to, and when we "fixed" it we broke existing code - see bug #11069 for instance - so it had to be reverted).

There is a new UIImage.Scale(SizeF,float) overload that will let you specify the scale factor (and if you specify 0 as the scale factor it will be detected automatically).