| 123456789101112131415161718192021222324252627282930313233343536 |
- #include <stdint.h>
- #include <iostream>
-
- // unsigned rational number: p/q
- struct urational_t {
- urational_t();
- urational_t(uint32_t p, uint32_t q);
-
- uint32_t p; // numerator
- uint32_t q; // denominator
- };
-
- // signed rational number: p/q
- struct srational_t {
- srational_t();
- srational_t(int32_t p, int32_t q);
-
- int32_t p; // numerator
- int32_t q; // denominator
- };
-
- struct ExifTags {
- ExifTags();
-
- static bool read_from_jpeg(std::istream &stream, ExifTags &output);
-
- // Returns true => output reference is set to exposure time or shutter speed in seconds.
- // Returns false => do not set output because there is no valid value.
- bool get_exposure_time(double &output);
-
- bool ifd0_parsed_ok;
- bool exififd_parsed_ok;
- uint16_t exififd_offset;
- urational_t exposure_time;
- srational_t shutter_speed_value;
- };
|