author | alwin <alwin> | 2004-11-06 02:55:45 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-06 02:55:45 (UTC) |
commit | a93a0ee1fce8b2fb7abac475a97dac8001aed8e0 (patch) (side-by-side diff) | |
tree | 21890174b801d6b14c67740596316847d05ffffe /libopie2/opiemm/opieexif.h | |
parent | 466245b561abe1514ef37ea978b5958caefdc962 (diff) | |
download | opie-a93a0ee1fce8b2fb7abac475a97dac8001aed8e0.zip opie-a93a0ee1fce8b2fb7abac475a97dac8001aed8e0.tar.gz opie-a93a0ee1fce8b2fb7abac475a97dac8001aed8e0.tar.bz2 |
moved a lot of code from opie-eye_slave into lib
-rw-r--r-- | libopie2/opiemm/opieexif.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiemm/opieexif.h b/libopie2/opiemm/opieexif.h index efaed71..fb06bf8 100644 --- a/libopie2/opiemm/opieexif.h +++ b/libopie2/opiemm/opieexif.h @@ -39,101 +39,108 @@ public: uchar * Data; int Type; unsigned Size; }; struct TagTable_t { unsigned short Tag; const char*const Desc; }; private: static const int MAX_SECTIONS=20; static const unsigned int PSEUDO_IMAGE_MARKER=0x123; Section_t Sections[MAX_SECTIONS]; QString CameraMake; QString CameraModel; QString DateTime; int Orientation; int Height, Width; int ExifImageLength, ExifImageWidth; int IsColor; int Process; int FlashUsed; float FocalLength; float ExposureTime; float ApertureFNumber; float Distance; int Whitebalance; int MeteringMode; float CCDWidth; float ExposureBias; int ExposureProgram; int ISOequivalent; int CompressionLevel; QString UserComment; QString Comment; QImage Thumbnail; unsigned char * LastExifRefd; int ExifSettingsLength; double FocalplaneXRes; double FocalplaneUnits; int MotorolaOrder; int SectionsRead; int ReadJpegSections (QFile & infile, ReadMode_t ReadMode); void DiscardData(void); int Get16u(void * Short); int Get32s(void * Long); unsigned Get32u(void * Long); double ConvertAnyFormat(void * ValuePtr, int Format); void ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength); void process_COM (const uchar * Data, int length); void process_SOFn (const uchar * Data, int marker); int Get16m(const void * Short); void process_EXIF(unsigned char * CharBuf, unsigned int length); int Exif2tm(struct ::tm * timeptr, char * ExifTime); public: //! Contructor for initialising ExifData(); //! destructor virtual ~ExifData(); //! scan a given file /*! * try to scan the EXIF data of a image file * \param aFile the file to scan * \return true if success, otherwise false */ bool scan(const QString &aFile); QString getCameraMake() { return CameraMake; } QString getCameraModel() { return CameraModel; } QString getDateTime() { return DateTime; } int getOrientation() { return Orientation; } int getHeight() { return Height; } int getWidth() { return Width; } int getIsColor() { return IsColor; } int getProcess() { return Process; } int getFlashUsed() { return FlashUsed; } float getFocalLength() { return FocalLength; } float getExposureTime() { return ExposureTime; } float getApertureFNumber() { return ApertureFNumber; } float getDistance() { return Distance; } int getWhitebalance() { return Whitebalance; } int getMeteringMode() { return MeteringMode; } float getCCDWidth() { return CCDWidth; } float getExposureBias() { return ExposureBias; } int getExposureProgram() { return ExposureProgram; } int getISOequivalent() { return ISOequivalent; } int getCompressionLevel() { return CompressionLevel; } QString getUserComment() { return UserComment; } QString getComment() { return Comment; } QImage getThumbnail(); bool isThumbnailSane(); bool isNullThumbnail() { return !isThumbnailSane(); } + + // some helpers + static QString color_mode_to_string( bool b ); + static QString compression_to_string( int level ); + static QString white_balance_string( int i ); + static QString metering_mode( int i); + static QString exposure_program( int i ); }; } } #endif |