This is a migrated thread and some comments may be shown as answers.

Do Telerik ImageEditor preserve the image Metadata?

2 Answers 75 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
em
Top achievements
Rank 1
em asked on 07 Jul 2017, 02:35 PM

I'm trying to access some metada features of the image selected by user. I'm using following code to read metadata of the image once user selects it. However, it always returns null. 

var metadata = ImageEditorUI.ImageEditor.Image.Bitmap.Metadata; 

 

Does telerik imageEditor erases all metadata when loaded?

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 12 Jul 2017, 02:23 PM
Hello Em,

I will check your scenario a bit later and come back to you with more information on the matter.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Martin Ivanov
Telerik team
answered on 12 Jul 2017, 02:41 PM
Hello,

The RadImageEditor works with RadBitmap object which internally uses the native WriteableBitmap that doesn't support storing metadata. This is why the property returns null.

A possible approach I can suggest for getting the metadata is to do it via the originally loaded image. For example, you can use the BitFrame class which supports metadata.
BitmapFrame originalSource = BitmapFrame.Create(new Uri(myImagePath, UriKind.RelativeOrAbsolute));
RadBitmap bitmap = new RadBitmap(originalSource);
this.imageEditor.Image = bitmap;
 
var metadata = originalSource.Metadata;

Can you try this approach and let me know if it works in your case.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ImageEditor
Asked by
em
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or