Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How create round skbitmap

olzhastypeolzhastype Member ✭✭

Hi, I need create round bitmap from SKBitmap

I get bitmap
public async Task GetPhoto()
{
try
{
Uri uri = new Uri();
WebRequest request =WebRequest.Create(uri);
WebResponse response = request.GetResponse();
Stream responseStream = response.GetResponseStream();
return SKBitmap.Decode(responseStream);
}
catch (Exception ex)
{

        }
        return new SKBitmap();
    }

Answers

  • PaulNTUPaulNTU USMember ✭✭✭
    edited May 2019

    You dont really create a round image, you create a normal bitmap (Rectangular), draw the background as transparent and then draw a circular image onto the bitmap. When shown the image will appear as circular

    HTH
    Paul

Sign In or Register to comment.