internal void AddTag (ImageTag tag)
{
if ((tag.TagTypes & AllowedTypes) != tag.TagTypes)
throw new Exception (String.Format ("Attempted to add {0} to an image, but the only allowed types are {1}", tag.TagTypes, AllowedTypes));
if (tag is IFDTag)
Exif = tag as IFDTag;
else if (tag is XmpTag)
Xmp = tag as XmpTag;
else
OtherTags.Add (tag);
all_tags = null;
}