"Not supported image format." on AWS environment after upgrading Telerik UI for Blazor to 8.0 version

2 Answers 32 Views
General Discussions
n/a
Top achievements
Rank 1
Iron
Iron
Iron
n/a asked on 28 Feb 2025, 04:23 PM
Currently I'm using below code that it throws an exception on AWS environment that "Not supported image format."
 using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream($"ClaimForms.Server.Shared.Images.{logoFile}.png"))
 {
     ImageSource imageSource = new ImageSource(stream, ImageQuality.High);
     CurrentEditor.DrawImage(imageSource, new Size(162, 42));
 }
Stream is not null and exception coming from ImageSource(). Could someone help me on this?

2 Answers, 1 is accepted

Sort by
0
Vaibhav
Top achievements
Rank 1
Iron
Iron
answered on 03 Mar 2025, 12:12 PM

Hi ,

 Before importing the document use the below code and get latest stable nuget package of Telerik.Documents.ImageUtils 

   Telerik.Documents.ImageUtils.ImagePropertiesResolver defaultImagePropertiesResolver = new                       Telerik.Documents.ImageUtils.ImagePropertiesResolver(); 

    Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.ImagePropertiesResolver = defaultImagePropertiesResolver; 

 I am not sure this code solve your issue but you can try at least

Thank you 
Vaibhav
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Mar 2025, 01:12 PM

Hello,

I would recommend you to have a look at the following forum thread which seems to be related to this topic: 

https://www.telerik.com/forums/telerik-windows-documents-fixed-exceptions-notsupportedimageformatexception-not-supported-image-format 

I hope you find this information helpful. Please, let me know if there is anything else I can assist you with.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

n/a
Top achievements
Rank 1
Iron
Iron
Iron
commented on 03 Mar 2025, 08:54 PM

Hi Vaibhav and Dess. Thank you for your comment. Converting .png format to .jpg fixed my issue. 
Tags
General Discussions
Asked by
n/a
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Vaibhav
Top achievements
Rank 1
Iron
Iron
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or