Hello i want to load a .bmp image into ImageEditor.
i tryed doing it the way described below, but i get "Object reference not set to an instance of an object" when trying to initialize the radbitmap with the byte array. Other formats like .jpeg and .png works fine with the same code
i tryed doing it the way described below, but i get "Object reference not set to an instance of an object" when trying to initialize the radbitmap with the byte array. Other formats like .jpeg and .png works fine with the same code
<
telerik:RadImageEditorUI
Image
=
"{Binding Image}"
x:Name
=
"ImageEditorUI"
>
private RadBitmap _image = null;
public RadBitmap Image
{
get { return _image; }
set
{
_image = value;
RaisePropertyChanged();
}
}
private void BuildAttachmentImage(byte[] FileContent)
{
try
{
MemoryStream data = new MemoryStream(FileContent);
Image = new RadBitmap(data);
RaisePropertyChanged("Image");
}
catch (Exception ex)
{
ShowMessage(MessageSeverity.FatalError, ex.Message, ex.ToString());
}
}