Do Telerik ImageEditor preserve the image Metadata?

3 posts, 0 answers
  1. em
    em avatar
    2 posts
    Member since:
    Jun 2017

    Posted 07 Jul Link to this post

    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. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1408 posts

    Posted 12 Jul Link to this post

    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.
  3. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1408 posts

    Posted 12 Jul Link to this post

    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.
Back to Top