如何在xamarin PCL中转换字节中的图像,反之亦然

时间:2017-09-05 13:39:31

标签: c# android xamarin xamarin.ios xamarin.forms

我正在使用签名板来捕获PCL中的签名。代码返回带有文件名的签名文件位置。但问题是将图像转换为字节数组。我见过多次参考,但没有工作。下面是我获取文件位置的代码示例。

saveImageBtn.Clicked += (sender, e) =>{
      var value = DependencyService.Get<ISign>().Sign();
      drawingImage.SavedImagePath = value; // I am getting file location here 
      Navigation.PushModalAsync(new SignatureImagePage(drawingImage.SavedImagePath));
 };

我想转换我在drawingImage.SavedImagePath中获得的文件。我怎样才能做到这一点。

之前使用的参考:

  

Error - Bitmap could not found ,   Not any solution in this link,   Not any Solution

希望有人能为我提供解决方案

0 个答案:

没有答案