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

Wrong density unit on png images #1123

Closed
stephsen opened this issue Feb 3, 2022 · 9 comments
Closed

Wrong density unit on png images #1123

stephsen opened this issue Feb 3, 2022 · 9 comments
Milestone

Comments

@stephsen
Copy link

stephsen commented Feb 3, 2022

Description

Hello,

When I retrieve the density of an image in png format, it returns the value '314.96' with a unit of 'inch'.
image

But in Photoshop, the density is 800 pixels per inch and
image

and in pixels per centimeter
image

I try to change units, but it's not work because Density object is already in PixelsPerInch, but value in PixelsPerCentimeter.
image.Density.ChangeUnits(DensityUnit.PixelsPerInch)

Steps to Reproduce

Use attached picture to reproduce this.

  • Magick.NET version: Magick.NET-Q16-x64 9.0.0
  • Environment (Operating system, version and so on): Windows 10 pro

Thanks
PNG_GRIS.zip

@stephsen stephsen changed the title Wrong unit on png images Wrong density unit on png images Feb 4, 2022
@dlemstra
Copy link
Owner

dlemstra commented Feb 4, 2022

It looks like you found a bug inside ImageMagick. After the image is read we get some information from the xmp profile. But we only change the units and not the resolution. This will be fixed in the next release and the resolution will be 800 DPI.

@stephsen
Copy link
Author

stephsen commented Feb 4, 2022

Hello,

do you have any idea when the new version will be released?

Thanks a lot

@dlemstra dlemstra added this to the 9.1.0 milestone Feb 6, 2022
@dlemstra
Copy link
Owner

dlemstra commented Feb 6, 2022

You were lucky. I was planning to release a new version this weekend and I just published that release. Normally the answer would be: I don't know?.

@dlemstra dlemstra closed this as completed Feb 6, 2022
@stephsen
Copy link
Author

stephsen commented Feb 7, 2022

Unfortunately, that doesn't work. I have exactly the same result

@dlemstra dlemstra reopened this Feb 7, 2022
@dlemstra
Copy link
Owner

dlemstra commented Feb 7, 2022

I am getting this as the output:

afbeelding

@dlemstra dlemstra closed this as completed Feb 7, 2022
@stephsen
Copy link
Author

I don't have a same result as you !
image

@stephsen
Copy link
Author

Hello,

do you have an explanation why it's different for the same image ?

Thanks

@stephsen
Copy link
Author

My apologies,

I just updated to the latest version and the result is correct.

Thanks a lot for your good job.

@dlemstra
Copy link
Owner

No problem was just going to aak if you could double check if you upgraded to the most recent version.

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