Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 21660 [details]
A 700x461 pixel argb png should take up 4*700*461 bytes which is roughly 1.23 MB when converted to bitmap. When it is placed inside an Image element which has a smaller size, it should even occupy less space in memory due to sampling.
But when I investigate the app using Android Monitor-->Memory, I see that for every time I add this image, it increases memory by about 20 MB.
I tested with many different images but the result is the same and it cause out of memory exceptions rather quickly. I attached one of the images I used for testing.
Could you please test this as soon as possible because if it is the case, it is a very very urgent bug.
Here is the simple xaml that can be used to reproduce this:
<StackLayout Padding="0,700,0,100" Spacing="20">
<Image WidthRequest="160" Source="withoutalpha.png"></Image>
I found out that it is due to the image file being in the drawable folder. No problem when image is in the resource folder with the right screen resolution. Marking it as resolved.