Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BadImageFormatException when creating image using SkiaSharp in ASP.NET Web application #579

Closed
MohanaselvamJ opened this issue Jul 13, 2018 · 1 comment

Comments

@MohanaselvamJ
Copy link

MohanaselvamJ commented Jul 13, 2018

Description

Results BadImageFormatException when creating image using SkiaSharp library in ASP.NET Web application.

Code

When creating image using in SKBitmap constructor
public SKBitmap(int width, int height, bool isOpaque = false);

Exeption detail

[BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]
SkiaSharp.SkiaApi.sk_colortype_get_default_8888() +0
SkiaSharp.SKImageInfo..cctor() +7

[TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.]
SkiaSharp.SKBitmap..ctor(Int32 width, Int32 height, Boolean isOpaque) +38

Basic Information

  • Version with issue: 1.60
  • IDE: Visual Studio 2017
@mattleibow
Copy link
Contributor

Duplicate of #513
Duplicate of #572

Basically, the Windows build, you have to pass the preferred architecture, or make sure you are not building AnyCPU and running on a different platform.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants