You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just encountered the same issue - the Tiff code looks as though it was never quite finished and only deals with tags that are categorized as 'IFD.Zeroth'. It won't bother writing other tags, like ones categorized as IFD.Exif.
Workaround :
var id = (ExifTag)((int)ExifTag.Make % (int)IFD.Zeroth + (int)IFD.Zeroth);
file2.Properties.Set(id, "12345");
Why does it work? The code categorizes the tag IDs by adding 100000, 200000, 300000, etc to them (the IDs are 16 bit values). The TIFF code only deals with the range from 100000 (IFD.Zeroth) to 165535. So, by remapping the tag into that range, you trick the TIFF code into writing it out. As far as I can work out, the output file is correct providing your added tags are correct.
Note that there is also some special handling of tags when they are read for Exif tags that is missed because of this issue, but the workaround may be enough.
Using this on .jpg files works but not with .tif files
file2.Properties.Set(ExifTag.Make, "12345");
The text was updated successfully, but these errors were encountered: