I am trying to resize pictures using this GihHub code from Xamarin website .
The code is greyed out when I want to implement it in my Xamarin forms shared project.
It seems that :
#if __IOS__
#endif
#if __ANDROID__
#endif
does not work. I looked for many solutions and just find this one:
if (Device.RuntimePlatform == Device.iOS)
{
// iOS
return ResizeImageIOS(imageData, width, height);
}
else if (Device.RuntimePlatform == Device.Android)
{
// Android
}
But the things is I cannot see how to do it because there are functions.
If you have a better solution I will take.