Beispiel #1
0
        public ExifData(string filename)
        {
            var exif = new ExifInterface(filename);

            _rawData = new Dictionary <string, object>
            {
                { ExifInterface.TagAperture, exif.GetAttributeDouble(ExifInterface.TagAperture, 1) },
                { ExifInterface.TagDatetime, exif.GetAttribute(ExifInterface.TagDatetime) },
                { ExifInterface.TagExposureTime, exif.GetAttribute(ExifInterface.TagExposureTime) },
                { ExifInterface.TagFlash, exif.GetAttribute(ExifInterface.TagFlash) },
                { ExifInterface.TagFocalLength, exif.GetAttributeDouble(ExifInterface.TagFocalLength, 0) },
                { ExifInterface.TagGpsAltitude, exif.GetAttribute(ExifInterface.TagGpsAltitude) },
                { ExifInterface.TagGpsAltitudeRef, exif.GetAttribute(ExifInterface.TagGpsAltitudeRef) },
                { ExifInterface.TagGpsDatestamp, exif.GetAttribute(ExifInterface.TagGpsDatestamp) },
                { ExifInterface.TagGpsLatitude, exif.GetAttribute(ExifInterface.TagGpsLatitude) },
                { ExifInterface.TagGpsLatitudeRef, exif.GetAttribute(ExifInterface.TagGpsLatitudeRef) },
                { ExifInterface.TagGpsLongitude, exif.GetAttribute(ExifInterface.TagGpsLongitude) },
                { ExifInterface.TagGpsLongitudeRef, exif.GetAttribute(ExifInterface.TagGpsLongitudeRef) },
                { ExifInterface.TagGpsProcessingMethod, exif.GetAttribute(ExifInterface.TagGpsProcessingMethod) },
                { ExifInterface.TagGpsTimestamp, exif.GetAttribute(ExifInterface.TagGpsTimestamp) },
                { ExifInterface.TagImageLength, exif.GetAttribute(ExifInterface.TagImageLength) },
                { ExifInterface.TagImageWidth, exif.GetAttribute(ExifInterface.TagImageWidth) },
                { ExifInterface.TagIso, exif.GetAttribute(ExifInterface.TagIso) },
                { ExifInterface.TagMake, exif.GetAttribute(ExifInterface.TagMake) },
                { ExifInterface.TagModel, exif.GetAttribute(ExifInterface.TagModel) },
                { ExifInterface.TagOrientation, exif.GetAttributeInt(ExifInterface.TagOrientation, -1) },
                { ExifInterface.TagWhiteBalance, exif.GetAttributeInt(ExifInterface.TagWhiteBalance, 0) },
            };
        }