Exemple #1
0
        public override Dictionary <ushort, Tag> parseExif()
        {
            //From Nef parser, to replace
            Dictionary <ushort, Tag>    temp             = new Dictionary <ushort, Tag>();
            Dictionary <ushort, string> standardExifName = new DictionnaryFromFileString(@"Assets\\Dic\StandardExif.dic");

            foreach (ushort exifTag in standardExifName.Keys)
            {
                Tag tempTag = null;

                if (ifd != null && tempTag == null)
                {
                    ifd.tags.TryGetValue(exifTag, out tempTag);
                }

                if (tempTag != null)
                {
                    string t = "";
                    standardExifName.TryGetValue(exifTag, out t);
                    tempTag.displayName = t;

                    temp.Add(exifTag, tempTag);
                }
            }
            return(temp);
        }
Exemple #2
0
        public override Dictionary <ushort, Tag> parseExif()
        {
            Dictionary <ushort, Tag>    temp             = new Dictionary <ushort, Tag>();
            Dictionary <ushort, ushort> nikonToStandard  = new DictionnaryFromFileUShort(@"Assets\Dic\NikonToStandard.dic");
            Dictionary <ushort, string> standardExifName = new DictionnaryFromFileString(@"Assets\\Dic\StandardExif.dic");

            foreach (ushort exifTag in standardExifName.Keys)
            {
                Tag    tempTag = null;
                ushort nikonTagId;
                if (nikonToStandard.TryGetValue(exifTag, out nikonTagId))
                {
                    /*
                     * ifd.tags.TryGetValue(nikonTagId, out tempTag);
                     * foreach (IFD ifd in subifd)
                     * {
                     *  if (tempTag == null) ifd.tags.TryGetValue(nikonTagId, out tempTag);
                     * }
                     * if (makerNote.preview != null && tempTag == null) makerNote.preview.tags.TryGetValue(nikonTagId, out tempTag);
                     */
                    if (makerNote.ifd != null && tempTag == null)
                    {
                        makerNote.ifd.tags.TryGetValue(nikonTagId, out tempTag);
                    }
                    if (tempTag == null)
                    {
                        exif?.tags.TryGetValue(nikonTagId, out tempTag);
                    }

                    /*if (tempTag == null)
                     * {
                     *  tempTag = new Tag
                     *  {
                     *      dataType = 2,
                     *      data = { [0] = "Data not avalaible" }
                     *  };
                     * }*/
                    if (tempTag != null)
                    {
                        string t = "";
                        standardExifName.TryGetValue(exifTag, out t);
                        tempTag.displayName = t;

                        temp.Add(nikonTagId, tempTag);
                    }
                }
            }
            return(temp);
        }