DocumentConverter.Convert .bmp to .jpg - ImagingEngine.InjectLoaders is not found
Problem reported by Matt Love - 1/23/2023 at 3:19 AM
Resolved
Hi all.

When converting files, I can successfully convert docx to pdf and view docs and images in the browser, but get errors while converting image formats in the back end c#.

Error
Image loading failed.
-- > The type initializer for '_0Wb' threw an exception.
    -- > ImagingEngine.InjectLoaders is not found

We are developing a new .net core 6 mvc application and have followed the steps here to get setup https://docs.gleamtech.com/documentultimate/html/using-documentultimate-in-an-asp-net-core-project.htm.

DocumentConverter.Convert(@"D:\Temp\Test.docx", GleamTech.DocumentUltimate.DocumentFormat.Pdf); // Works fine
DocumentConverter.Convert(@"D:\Temp\TestImage.bmp", GleamTech.DocumentUltimate.DocumentFormat.Jpg); // Fails

I read that sometimes I need to explicitly call GleamTechConfiguration.EnsureAssemblies() even though it should be handled automatically via AddGleamTech andUseGleamTech methods. It did not help.

Any Help would be appreciated.
Cem Alacayir Replied
Employee Post Marked As Resolution
This is fixed now with the latest version:

Version 6.8.6 - April 11, 2023

  • Fixed: Some conversions for Imaging formats like .png to .jpg or .bmp to .jpg.

Reply to Thread

Enter the verification text