Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Exception in System.Drawing.SafeNativeMethods.Gdip.CheckStatus #11

Open
GuruGurra opened this issue Aug 16, 2021 · 1 comment
Open

Exception in System.Drawing.SafeNativeMethods.Gdip.CheckStatus #11

GuruGurra opened this issue Aug 16, 2021 · 1 comment

Comments

@GuruGurra
Copy link

When calling Bitmap.SetResolution() I get the following error on a Mac:

Exception:System.ArgumentException: Parameter is not valid.
at System.Drawing.SafeNativeMethods.Gdip.CheckStatus(Int32 status)
at System.Drawing.Bitmap.SetResolution(Single xDpi, Single yDpi)
at StreamDeck_Midi.ImageController.ResizeImage(Image image, Int32 width, Int32 height) in C:\Projects\StreamDeck-Midi - Core\StreamDeck-Midi\Translation\ImageController.cs:line 424
at StreamDeck_Midi.ImageController.GetCustomSliderImage(String baseImagePath, String sliderImagePath, Int32 positionPercent, eFaderButtonType FaderButtonType, Int32 paddingTop, Int32 paddingBottom, String& newbaseImagePath, String& newsliderImagePath) in C:\Projects\StreamDeck-Midi - Core\StreamDeck-Midi\Translation\ImageController.cs:line 341

The call works without problems in Windows.

I'm confused by the state of this project.

I'm using the latest release Nuget package (5.8.64) that is published June 26, 2019, but according to this page, there are "No releases published" and "No packages published"? Looking at the build.yaml, there should be a version 6.0.5, but it's not available at Nuget(?)

@qmfrederik
Copy link
Contributor

You can give 6.0.5.128 a try, which has been published on NuGet today.

But Bitmap.SetResolution is just a tiny wrapper around GdipBitmapSetResolution, and it doesn't look like that method has changed much the last 10 years or so :-).

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

No branches or pull requests

2 participants