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

How to ignore unknown tiff Tag(32934 , etc) when use MagickImage open such tiff image ? #1626

Open
Charltsing opened this issue May 9, 2024 · 5 comments

Comments

@Charltsing
Copy link

Charltsing commented May 9, 2024

Magick.NET version

13.7

Environment (Operating system, version and so on)

Windows10, net framework 4.7.2

Description

Tag32934.zip

MagickImage open a tiff file with Tag 32934 failed, i ues setting ignore it and open this tiff file successfully .
settings.SetDefines(new TiffReadDefines
{
IgnoreTags = new[] {"32934" }
});

I want to know how to ignore unknown tags in the future, so as to avoid errors when opening such tiff images with unknown Tag?

Steps to Reproduce

using (MagickImage magickimage = new MagickImage(picbytes, settings))

@dlemstra
Copy link
Owner

dlemstra commented May 9, 2024

The way this option works is that it tells the tiff library to ignore the tags that you specified. There is no option to tell the library that it should ignore all unknown tags.

@Charltsing
Copy link
Author

I want to avoid Magic.Net reporting an error when encountering an unknown Tiff Tag
it should at least be able to open the image.

@dlemstra
Copy link
Owner

The problem is not that there are unknown tiff tags. The problem is that one of those tiff tags is invalid and contains data that cannot be read by the tiff library. Both a warning and error are being raised.

@Charltsing
Copy link
Author

Would you like to add an optional options to ignore such warning and error when open tiff image ?

I hope to show the image even if it includes invalid tags.

@dlemstra
Copy link
Owner

That is out of my control. The library that is being used doesn't have an option to ignore these kind of errors.

@Charltsing Charltsing changed the title How to ignore unknow tiff Tag(32934 , etc) when use MagickImage open such tiff image ? How to ignore unknown tiff Tag(32934 , etc) when use MagickImage open such tiff image ? May 17, 2024
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