The type initializer for 'X64' threw an exception
See original GitHub issueTrying to modify existing .NET code by adding few lines to change the size, modify image. tested on local machine without any issues, but on server getting error, Please help ASAP.
Really appreciated any help.
in bin folder i have:
gsdll32 Magick.NET-Q8-AnyCPU Magick.NET.Web-Q8-AnyCPU
New Code:
' VALIDATE AND MODIFY IMAGE ****
Using images As New MagickImageCollection()
' Add all the pages of the pdf file to the collection
Dim image As New MagickImage(ConvertedImage)
If image.Width > "850" Then
Dim sGeometry As New MagickGeometry()
With sGeometry
.Width = "1150"
.Height = "900"
.IgnoreAspectRatio = True
End With
image.Scale(sGeometry)
image.Write(ConvertedImage)
End If
End Using
' VALIDATE AND MODIFY IMAGE
at ImageMagick.MagickSettings.NativeMethods.X64.MagickSettings_Create() at ImageMagick.MagickSettings.NativeMagickSettings…ctor() at ImageMagick.MagickSettings…ctor() at ImageMagick.MagickImage…ctor() at nomination.loadfileHandler.convert_pdf_to_image_nominee(String fn, String NomineeGEID)
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
The type initializer for 'X64' threw an exception. #874
The application is running on x64. I have tried adding 64 and anycpu dlls for magick.net. can anyone please help me? I am...
Read more >c# - The type initializer for 'ImageMagick.Types' threw an ...
I have just installed a Magick.net from the nuget and codeplex. I just want to write a sample application for compressing an image...
Read more >"The Type initializer....threw an exception" error when ...
When logging into an Autodesk Vault you receive the error message: "The Type Initializer for 'Autodesk.Connectivity.WebServices.WSE.
Read more >MagickNet type initializer throws exception
The error is "The type initializer for 'ImageMagick.MagickImage' threw an exception." it does not matter if i insert an image file path in...
Read more >Newer builds not working at all
NET-Q16-OpenMP-x64: The type initializer for 'NativeMagickSettings' threw an exception. I've uninstalled and reinstalled and tried to repair but it all ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is possible that your application has no access to the temporary directory @blackn1ght, see: https://github.com/dlemstra/Magick.NET/tree/master/Documentation#anycpu
we still getting exception, but decide just to handle it locally since looks like ddl does what it suppose to do just throw error at the end.
You may close the issue and thanks for support.
Thanks Alex.
On Sun, Jul 29, 2018 at 11:11 AM, Dirk Lemstra notifications@github.com wrote: