Пример #1
0
        private static ExifFlashMode GetFlashMode(BitmapMetadata metadata)
        {
            var value = metadata.ReadUShort(FlashModeQuery);

            return(value.HasValue
                                ? (value.Value % 2 == 1 ? ExifFlashMode.FlashFired : ExifFlashMode.FlashDidNotFire)
                                : ExifFlashMode.Unknown);
        }
Пример #2
0
        private static ExifOrientation GetOrientation(BitmapMetadata metadata)
        {
            var direction = metadata.ReadUShort(OrientationQuery);

            return(direction.HasValue ? (ExifOrientation)direction.Value : ExifOrientation.None);
        }
Пример #3
0
        private static ExifColorRepresentation GetColorRepresentation(BitmapMetadata metadata)
        {
            var value = metadata.ReadUShort(ColorRepresentationQuery);

            return(value.HasValue && value == 1 ? ExifColorRepresentation.sRGB : ExifColorRepresentation.Uncalibrated);
        }
Пример #4
0
        private static ExifWhiteBalanceMode GetWhiteBalanceMode(BitmapMetadata metadata)
        {
            var mode = metadata.ReadUShort(WhiteBalanceQuery);

            return(!mode.HasValue ? ExifWhiteBalanceMode.Unknown : (ExifWhiteBalanceMode)mode.Value);
        }
Пример #5
0
        private static ExifExposureMode GetExposureMode(BitmapMetadata metadata)
        {
            var mode = metadata.ReadUShort(ExposureModeQuery);

            return(!mode.HasValue ? ExifExposureMode.Unknown : (ExifExposureMode)mode.Value);
        }
Пример #6
0
 private static ExifColorRepresentation GetColorRepresentation( BitmapMetadata metadata )
 {
     var value = metadata.ReadUShort( ColorRepresentationQuery );
     return value.HasValue && value == 1 ? ExifColorRepresentation.sRGB : ExifColorRepresentation.Uncalibrated;
 }
Пример #7
0
 private static ExifWhiteBalanceMode GetWhiteBalanceMode( BitmapMetadata metadata )
 {
     var mode = metadata.ReadUShort( WhiteBalanceQuery );
     return !mode.HasValue ? ExifWhiteBalanceMode.Unknown : (ExifWhiteBalanceMode) mode.Value;
 }
Пример #8
0
 private static ExifOrientation GetOrientation( BitmapMetadata metadata )
 {
     var direction = metadata.ReadUShort( OrientationQuery );
     return direction.HasValue ? (ExifOrientation) direction.Value : ExifOrientation.None;
 }
Пример #9
0
 private static ExifFlashMode GetFlashMode( BitmapMetadata metadata )
 {
     var value = metadata.ReadUShort( FlashModeQuery );
     return value.HasValue
         ? (value.Value % 2 == 1 ? ExifFlashMode.FlashFired : ExifFlashMode.FlashDidNotFire)
         : ExifFlashMode.Unknown;
 }
Пример #10
0
 private static ExifExposureMode GetExposureMode( BitmapMetadata metadata )
 {
     var mode = metadata.ReadUShort( ExposureModeQuery );
     return !mode.HasValue ? ExifExposureMode.Unknown : (ExifExposureMode) mode.Value;
 }