Update to 2.0.0 tree from current Fremantle build
[opencv] / src / highgui / grfmt_imageio.h
1 /*
2  *  grfmt_imageio.h
3  *  
4  *
5  *  Created by Morgan Conbere on 5/17/07.
6  *
7  */
8
9 #ifndef _GRFMT_IMAGEIO_H_
10 #define _GRFMT_IMAGEIO_H_
11
12 #ifdef HAVE_IMAGEIO
13
14 #include "grfmt_base.h"
15 #include <ApplicationServices/ApplicationServices.h>
16
17 namespace cv
18 {
19
20 class ImageIODecoder : public BaseImageDecoder
21 {
22 public:
23     
24     ImageIODecoder();
25     ~ImageIODecoder();
26     
27     bool  readData( Mat& img );
28     bool  readHeader();
29     void  close();
30     
31     size_t signatureLength() const;
32     bool checkSignature( const string& signature ) const;
33
34     ImageDecoder newDecoder() const;
35
36 protected:
37     
38     CGImageRef imageRef;
39 };
40
41 class ImageIOEncoder : public BaseImageEncoder
42 {
43 public:
44     ImageIOEncoder();
45     ~ImageIOEncoder();
46
47     bool  write( const Mat& img, const vector<int>& params );
48
49     ImageEncoder newEncoder() const;
50 };
51
52 }
53
54 #endif/*HAVE_IMAGEIO*/
55
56 #endif/*_GRFMT_IMAGEIO_H_*/