Go to the documentation of this file.00001
00002 #ifndef vil_jpeg_file_format_h_
00003 #define vil_jpeg_file_format_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <vil/vil_file_format.h>
00021 #include <vil/vil_image_resource.h>
00022
00023
00024 bool vil_jpeg_file_probe(vil_stream *vs);
00025
00026
00027 class vil_jpeg_file_format : public vil_file_format
00028 {
00029 public:
00030 virtual char const *tag() const;
00031 virtual vil_image_resource_sptr make_input_image(vil_stream *vs);
00032 virtual vil_image_resource_sptr make_output_image(vil_stream* vs,
00033 unsigned nx,
00034 unsigned ny,
00035 unsigned nplanes,
00036 enum vil_pixel_format);
00037 };
00038
00039
00040 class vil_jpeg_compressor;
00041 class vil_jpeg_decompressor;
00042
00043
00044 class vil_jpeg_image : public vil_image_resource
00045 {
00046 public:
00047 vil_jpeg_image(vil_stream *is);
00048 vil_jpeg_image (vil_stream* is, unsigned ni,
00049 unsigned nj, unsigned nplanes, vil_pixel_format format);
00050 ~vil_jpeg_image();
00051
00052
00053 virtual unsigned nplanes() const;
00054 virtual unsigned ni() const;
00055 virtual unsigned nj() const;
00056
00057 virtual enum vil_pixel_format pixel_format() const;
00058
00059
00060 char const *file_format() const;
00061
00062
00063
00064 virtual vil_image_view_base_sptr get_copy_view(unsigned i0, unsigned ni,
00065 unsigned j0, unsigned nj) const;
00066
00067
00068 virtual bool put_view(const vil_image_view_base& im, unsigned i0, unsigned j0);
00069
00070 bool get_property(char const *tag, void *prop = 0) const;
00071
00072
00073 void set_quality(int quality);
00074
00075 private:
00076 vil_jpeg_compressor *jc;
00077 vil_jpeg_decompressor *jd;
00078 vil_stream *stream;
00079 friend class vil_jpeg_file_format;
00080 };
00081
00082 #endif // vil_jpeg_file_format_h_