goofyui
goofyui

Reputation: 3492

Working with Images in Xamarin App programmig

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

Answers (3)

PlusInfosys
PlusInfosys

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

Paul Karam
Paul Karam

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:

  1. png8
  2. png24
  3. 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

mindOfAi
mindOfAi

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

Related Questions