コード例 #1
0
ファイル: ExifProfile.cs プロジェクト: bixiu/BlueMine
        private void InitializeValues()
        {
            if (this.values != null)
            {
                return;
            }

            if (this.data == null)
            {
                this.values = new Collection <ExifValue>();
                return;
            }

            var reader = new ExifReader();

            this.values          = reader.Read(this.data);
            this.invalidTags     = new List <ExifTag>(reader.InvalidTags);
            this.thumbnailOffset = (int)reader.ThumbnailOffset;
            this.thumbnailLength = (int)reader.ThumbnailLength;
        }
コード例 #2
0
        private void InitializeValues()
        {
            if (this.values != null)
            {
                return;
            }

            if (this.data is null)
            {
                this.values = new List <ExifValue>();
                return;
            }

            var reader = new ExifReader(this.data);

            this.values = reader.ReadValues();

            this.InvalidTags = reader.InvalidTags.Count > 0
                ? new List <ExifTag>(reader.InvalidTags)
                : (IReadOnlyList <ExifTag>)Array.Empty <ExifTag>();

            this.thumbnailOffset = (int)reader.ThumbnailOffset;
            this.thumbnailLength = (int)reader.ThumbnailLength;
        }