drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.56k stars 480 forks source link

port GifReader TagUserInputFlag bit processing from .NET #413

Closed kwhopper closed 4 years ago

kwhopper commented 5 years ago

Port this line from .NET to Java purely for consistency:

https://github.com/drewnoakes/metadata-extractor-dotnet/blob/2f446ce775cd6e7db0055ae9ed6d673eef36d541/MetadataExtractor/Formats/Gif/GifReader.cs#L334

drewnoakes commented 4 years ago

@kwhopper this code was added to the Java library in e5731c8ce98162a4938853b6b7b98c4b8d34a8bc which pre-dates this issue, so I'm not sure what action to take here. Am I missing something?

kwhopper commented 4 years ago

Difficult to recall. It's likely from comparison testing at some point when working on the RAS classes. Maybe it was to see if the bit shifting was needed, when a simple comparison to "2" is enough. If the bit shifting logic returns the same value, it's probably fine.