Reputation: 3492
I am working on a Xamarin App compatible with all devices. I have a general question related to images. I am using Location Mark Image Icons to provide locations available on the Map. My issue is, Image has a white background which is also showing along with its background. I want to show only the Image.
Is this related to the designer to provide the image without background? Or as a developer, I can do something on it.
Upvotes: 0
Views: 104
Reputation: 3446
If its simple white background you want to remove, You can utilise simple [MakeTransparent][1]
method ofBitMap
.
But this will remove all white coloured pixel. So IF your logo also contains white color, better you contact your designer.
Upvotes: 0
Reputation: 4210
Xamarin.Forms
doesn't delete your white background. What you need to do is following a small tutorial on how to use Adobe Photoshop for example and export your images as png
, you might even consider which png
type you need, there's 3 types of png
:
png8
png24
png32
I won't be going deep in explaining each one of them, but you need to know that they all support transparency and could have a transparent background, however, you might notice some differences between them on the edges.
For example, png8
will give a small white border while png24
will not show that.
You can check this for example: https://helpx.adobe.com/photoshop-elements/using/optimizing-images-png-24-format.html
Upvotes: 1
Reputation: 4622
No, you can't do anything about it using Xamarin.Forms
. You need to modify the image and remove the background (using Adobe Photoshop, etc.) and make sure to save it as .png
.
Upvotes: 0