question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect density information when reading an image

See original GitHub issue

Description

I am updating the version of Magick.NET from v7.14.2 to 8.4.0. I have some failing tests and it looks like reading an image results in incorrect denisty infomation.

I have an image that has a density of 72x72 (verified in photoshop and properties of the file). screenshot

When loading the image with the new version of Magick.NET the denisty is shows as 300x300.

v7.14.2

v7 14 2

v8.4.0

v8 4 0

Steps to Reproduce

var path = @"C:\TestFiles\imageMagick\test.jpg";
var image = new MagickImage();
image.Read(path); 
Console.WriteLine($"Density = X: {image.Density.X}. Y: {image.Density.Y}. Units: {image.Density.Units}.");

On version 7.14.2 - density 72x72 inch (expected) On version 8.4.0 - density 300x300 inch

Example Image

Any help would be really appreciated.

  • Magick.NET version: 8.4.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
amytantcommented, Apr 24, 2023

@dlemstra Thank you for the new release! It has resolved our issues.

1reaction
dlemstracommented, Apr 18, 2023

The WebP format doesn’t store the density information in some kind of metadata field. The xmp/exif profiles are used to store that information.

I will publish a new release soon. Maybe this week, maybe next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Android picking wrong density images?
The problem is that Android is picking the wrong image from the different density drawable folders. Here is how the layout looks:.
Read more >
Support different pixel densities
Defining dimensions with pixels is a problem because different screens have different pixel densities, so the same number of pixels ...
Read more >
Density Measurement: All You Need to Know
Density measurements check the purity and concentration of a sample and gives insight into its composition. The measurement of density is crucial in ......
Read more >
Responsive images - Learn web development | MDN
The general problem whereby you want to serve different cropped images in that way, for various layouts, is commonly known as the art ......
Read more >
7 Visualizing distributions: Histograms and density plots
A guide to making visualizations that accurately reflect the data, tell a story, and look professional.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found