Пример #1
0
        public EXIFPropertyItem(PropertyItem prop)
        {
            // Does KnownEXIFCodes have a corresponding entry?
            if (Enum.IsDefined(exifCode.GetType(), prop.Id))
            {
                exifCode = (KnownEXIFIDCodes)prop.Id;
            }
            else
            {
                exifCode = KnownEXIFIDCodes.UnknownCode;
            }
            exifType  = (EXIFPropertyTypes)prop.Type;
            data      = prop.Value;
            this.type = prop.Type;
            this.id   = prop.Id;
            this.len  = prop.Len;

            /*
             * Console.WriteLine("{0:X8} {1} {2} {3}", prop.Id, prop.Type, prop.Len, Enum.GetName(exifCode.GetType(), exifCode));
             * if (exifType == EXIFPropertyTypes.ExifTypeString)
             * {
             *      Console.WriteLine(this.ParsedString);
             * }
             * /*
             * foreach (byte b in data)
             * {
             *      Console.Write("{0:X2} ", b);
             * }
             * Console.WriteLine("");
             */
        }
Пример #2
0
 public EXIFPropertyItem(PropertyItem prop)
 {
     // Does KnownEXIFCodes have a corresponding entry?
     if (Enum.IsDefined(exifCode.GetType(), prop.Id))
     {
         exifCode = (KnownEXIFIDCodes)prop.Id;
     }
     else
     {
         exifCode = KnownEXIFIDCodes.UnknownCode;
     }
     exifType  = (EXIFPropertyTypes)prop.Type;
     data      = prop.Value;
     this.type = prop.Type;
     this.id   = prop.Id;
     this.len  = prop.Len;
 }