question

raphaelzhang avatar image
0 Votes"
raphaelzhang asked ColeXia-MSFT edited

Is there a cross platform graphics conversion library in Xamarin

I need to convert the image format, such as from JPG to PNG, and zoom at the same time, Support both Android and IOS.


The function is similar to System.Drawing

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered ColeXia-MSFT edited

Hello,

Welcome to Microsoft Q&A!

Take a look at DevKit.Xamarin.ImageKit .

It supports

  • Conversion

byte[] pngImage = await CrossImageConverter.Current.ConvertJpgToPng(sampleImage);

  • Resizing

byte[] reducedImage = await CrossImageResizer.Current.ResizeImageAsync(sampleImage, 320, 320, format);



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.