00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __RAWFILE_H
00024 #define __RAWFILE_H
00025
00026 #include <string>
00027 #include <vector>
00028
00029 #include <libopenraw/libopenraw.h>
00030
00031 namespace OpenRaw {
00032
00033 class Thumbnail;
00034
00035 void init();
00036
00037 class RawFile
00038 {
00039 public:
00040 typedef ::or_rawfile_type Type;
00041
00047 static RawFile *newRawFile(const char*_filename,
00048 Type _typeHint = OR_RAWFILE_TYPE_UNKNOWN);
00049
00051 virtual ~RawFile();
00053 Type type() const;
00054
00055
00056
00057
00060 const std::vector<uint32_t> & listThumbnailSizes(void);
00066 ::or_error getThumbnail(uint32_t size, Thumbnail & thumbnail);
00067 protected:
00073 RawFile(const char *_filename, Type _type);
00078 virtual ::or_error _enumThumbnailSizes(std::vector<uint32_t> &list) = 0;
00079
00087 virtual ::or_error _getThumbnail(uint32_t size, Thumbnail & thumbnail) = 0;
00088 private:
00089 static Type identify(const char*_filename);
00090
00091 RawFile(const RawFile&);
00092 RawFile & operator=(const RawFile &);
00093
00094 class Private;
00095
00096 Private *d;
00097 };
00098
00099
00100
00101 }
00102
00103
00104 #endif