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

MagickImage.ToBitmapWithDensity() throws Parameter is not valid exception #1419

Closed
d2phap opened this issue Jul 28, 2023 · 2 comments
Closed
Milestone

Comments

@d2phap
Copy link
Sponsor

d2phap commented Jul 28, 2023

Magick.NET version

13.2.0

Environment (Operating system, version and so on)

Windows 11 22H2

Description

Reported from d2phap/ImageGlass#1622

When reading this file with .ToBitmapWithDensity()

It throws exception on the bitmap.SetResolution:
image

   at System.Drawing.Bitmap.SetResolution(Single xDpi, Single yDpi)
   at ImageMagick.IMagickImageExtentions.SetBitmapDensity[TQuantumType](IMagickImage`1 image, Bitmap bitmap)
   at ImageMagick.IMagickImageExtentions.ToBitmap[TQuantumType](IMagickImage`1 self, Boolean withDensity)
   at ImageMagick.IMagickImageExtentions.ToBitmapWithDensity[TQuantumType](IMagickImage`1 self)

I would be nice if MagickNET can ignore the error!

Steps to Reproduce

using var imgM = new MagickImage();
imgM.Read(@"256815987-31008961-f200-4f85-b250-3e54e8d747ed.jpg", new MagickReadSettings());

var aaa = imgM.ToBitmapWithDensity(); // 🫠

image

dlemstra added a commit that referenced this issue Jul 28, 2023
@dlemstra
Copy link
Owner

Thanks for reporting this. This will be fixed in the next release.

@dlemstra dlemstra added this to the 13.2.1 milestone Jul 28, 2023
@dlemstra dlemstra modified the milestones: 13.2.1, 13.3.0 Sep 21, 2023
@dlemstra
Copy link
Owner

A new release that includes a fix for this has been published.

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

No branches or pull requests

2 participants