-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
BitmapFrame.Create() throws ArgumentException: 'Value does not fall within the expected range.' when XmpProfile is set #1652
Comments
…cument would add a xml declaration (#1652).
It looks like this is caused by the |
Does my sample project work with version 13.9.1? I get still the same issue. :-( |
I tested this with a patched version of your project and that worked. Not sure why it's not working. Will take a look at this again sometime next week. |
…athNavigable to a XmpProfile (#1652)
Turns out this was caused by the utf-8 byte order mark at the start of the stream. With my local testing I did something that would not cause it to be written but that did not end up in the release. It might take a while before I will publish a new release. |
Magick.NET version
Magick.NET-Q16-AnyCPU 13.9.0
Environment (Operating system, version and so on)
Windows 11 23H2
Description
I have a .NET Framework 4.8 environment and need Magick.NET and old PresentationCore to work together. In general I'd like to use Magick.NET to generate images with Exif and Xmp metadata + need to make sure PresentationCore can still read this data.
Steps to Reproduce
var image = new MagickImage("sample_640x426_iptc+xmp.jpg")
var xml = image.GetXmpProfile().ToXDocument()
, optional: do some manipulation.image.SetProfile(new XmpProfile(xml))
image.ToByteArray()
BitmapMetadata
class:BitmapFrame.Create()
breaks withMagick.NET seems to corrupt the metadata so that at least Window's PresentationCore can no longer create a
BitmapMetadata
instance.Sample solution:
ExifAndXmpConsole.zip
The text was updated successfully, but these errors were encountered: