Completed
Last Updated: 30 May 2022 07:13 by ADMIN
Release LIB 2022.2.530 (30 May 2022)
Martin Ivanov
Created on: 31 Mar 2022 09:52
Category: ImageEditor
Type: Feature Request
0
ImageEditor: Image disappears when apply rotate command on a image created from a System.Drawing.Image stream
The issues reproduces, if you load an image, using System.Drawing.Image.Image and then create a stream using its Save() method. Then use this stream to create a RadBitmap element. In order to recreate the issue, the ImageFormat.Jpeg should be used with the Image's Save() method.

When you call one of the rotate commands in order to rotate the image, the image goes blank.

The issue is not directly related to the implementation of the ImageEditor control, but to the Rotate method of RadBitmap which is used by the ImageEditor.

To work this around, use ImageFormat.Png instead of Jpeg when saving the image to a stream (from the System.Drawing.Image object).
       
var stream = new MemoryStream();
image.Save(stream, System.Drawing.Imaging.ImageFormat.Png);

0 comments