Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Support for additional IPTC metadata records

$
0
0
An enumeration is simply an integer that you can represent with a name. And enumerations are not limited to the known values. The following example will demonstrate this:
using System;
                    
publicclass Program
{
    privateenum IptcTag
    {
        Title = 5
    }
    
    publicstaticvoid Main()
    {
        Write(5);
        Write(6);
    }
    
    privatestaticvoid Write(byte value)
    {       
        IptcTag tag = (IptcTag) value;
        Console.WriteLine("{0} = {1}", (int)tag, tag.ToString());
    }
}
It will produce the following output:
5 = Title
6 = 6
This means that changing IptcTag tag = EnumHelper.Parse((int)Data[i++], IptcTag.Unknown); to IptcTag tag = (IptcTag)Data[i++]; should solve your issue.

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>