MemoryBmp image throwing ArgumentNullException within System.Drawing.Common

Hello,

When using the Paragraph.AppendPicture command with an image resource, the program is throwing a ArgumentNullException within System.Drawing.Common. 


The error occurs on line 2529 in the WPicture class when the image.RawFormat type is System.Drawing.Imaging.ImageFormat.MemoryBmp. 


According to this https://github.com/dotnet/corefx/pull/36937, a default encoder was added to alleviate this problem, but this does not seem to be implemented on your side. 

Please advise on a way to remove this error. 


Thanks. 


1 Reply

AN Anto Nihil Sahaya Raj Syncfusion Team April 18, 2024 12:03 PM UTC

Hi Natalie,

We have tried to reproduce the reported problem using the Paragraph.AppendPicture command with an MemoryBmp format image. But it works properly without any exceptions on our end. For your reference, we have attached the sample application which we tried to reproduce the reported problem at our end. We suggest you to try the attached sample at your end.

If the issue is not reproduced using the attached sample application at your end, please share the below details for further investigation,
1. Please share the image file with us, as we suspect that the problem might be due to the image being used at your end.

2. List of NuGet packages installed in your application.

3. Please provide the complete code snippet for issue replication.

4. If possible, please modify and share the attached sample application that reproduces the issue with us.

Based on the above details, we will proceed further to reproduce the same problem and will provide you appropriate solution at the earliest.


Regards,
Anto Nihil S


Attachment: AppendPictureinWord_82997ca.zip

Loader.
Up arrow icon