-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
PNGs with app1 profile persist data to converted JPG but don't appear to be exposed on MagickImage properties #1766
Comments
It looks like you are finding all the edge cases 😁The issue here is that the input image contains an |
Appreciate the confirmation of what I'm seeing. Agree that I don't know how or if you should patch it. One thought I had was maybe giving API consumers the ability to peek into the Example Code
|
That will not create an empty profile? This unit tests passes: using var image = new MagickImage(inputFile);
var profile = image.GetProfile("app1");
Assert.NotNull(profile);
var data = new ExifProfile(profile.ToByteArray());
Assert.Equal(10974, data.ToByteArray().Length); |
I am getting this result with my local development build that has a patch to make sure the exif profile is found when reading the png file: using var image = new MagickImage(inputFile);
var profile = image.GetExifProfile();
Assert.NotNull(profile);
Assert.Equal(11, profile.Values.Count); This will be fixed in the next release. |
Magick.NET version
14.2
Environment (Operating system, version and so on)
Windows
Description
We have a couple of user PNG images that appear to have density metadata that is persisted when converting to a JPG but isn't loaded when opening the image initially.
The
MagickImage
initially loads the PNG with Undefined Density but then converts to 300dpi after changing the format to JPG.I'm not familiar enough with how profiles should or shouldn't be interpreted to know the correct behavior here but it was a little surprising that it was treated differently. For us this causes one situation to render the image at 96dpi and the other to render it at 300dpi in an XPS document thus rendering ~3x smaller than expected.
This does not appear to be a regression from previous versions.
Steps to Reproduce
The following output is from the sample PNG and output code.
Image is all red pixels to remove user data.
The text was updated successfully, but these errors were encountered: