Esempio n. 1
0
        public Aperture(URational uRational)
        {
            this.uRational = new URational(uRational);

            ////URational urational = this.BitmapMetadata.GetQuery<URational>(ExifQueries.Aperture.Query);
            ////return "f/" + urational.ToDouble().ToString();
        }
        public ShutterSpeed(string shutterSpeed)
        {
            // Expected format is {numerator}/{denominator}
            string[] splitString = shutterSpeed.Split('/');

            if (splitString.Length == 2)
            {
                URational urational = new URational(Convert.ToInt32(splitString[0]), Convert.ToInt32(splitString[1]));

                this.Seconds = urational.ToDouble();
            }
            else
            {
                throw new ArgumentException("Shutterspeed was not of expected format:" + shutterSpeed);
            }
        }
Esempio n. 3
0
        public Aperture(string aperture)
        {
            // Expected format is {numerator}/{denominator}
            string[] splitString = aperture.Split('/');

            if (splitString.Length == 2)
            {
                int numerator   = Convert.ToInt32(splitString[0]);
                int denominator = Convert.ToInt32(splitString[1]);

                this.uRational = new URational(numerator, denominator);
            }
            else
            {
                throw new ArgumentException("Aperture was not of expected format:" + aperture);
            }
        }
 public ShutterSpeed(URational urational)
 {
     // Use 6 decimal places
     this.Seconds = urational.ToDouble(6);
 }
Esempio n. 5
0
 public Aperture(int numerator, int denominator)
 {
     this.uRational = new URational(numerator, denominator);
 }
Esempio n. 6
0
 public Aperture(double numerator)
 {
     this.uRational = new URational(numerator, 1);
 }
Esempio n. 7
0
 public Aperture()
 {
     this.uRational = new URational(0, 0);
 }
Esempio n. 8
0
 public URational(URational uRational)
 {
     this.Numerator   = uRational.Numerator;
     this.Denominator = uRational.Denominator;
 }