I want to save image from ImagEditor in code behind to external file by my own save method, I read that I can use the "IImageFormatProvide" interface for this target.
I have written the following code :
IImageFormatProvider formatProvider = ImageFormatProviderManager.GetFormatProviderByExtension(extension);
byte[] image = formatProvider.Export(this.ImageEditorUI.ImageEditor.Image);
I although tried to use the overload method: formatProvider.Export(this.ImageEditorUI.ImageEditor.Image,stream);
then I called my save method which take the byte array and save it in fileStream, but the Export method didn't work.
can you help me please.
Thanks.
I have written the following code :
IImageFormatProvider formatProvider = ImageFormatProviderManager.GetFormatProviderByExtension(extension);
byte[] image = formatProvider.Export(this.ImageEditorUI.ImageEditor.Image);
I although tried to use the overload method: formatProvider.Export(this.ImageEditorUI.ImageEditor.Image,stream);
then I called my save method which take the byte array and save it in fileStream, but the Export method didn't work.
can you help me please.
Thanks.