00001 // This is core/vil/file_formats/vil_jpeg_compressor.h 00002 #ifndef vil_jpeg_compressor_h_ 00003 #define vil_jpeg_compressor_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \author fsm 00010 // \verbatim 00011 // Modifications 00012 // 11 Oct 2002 Ian Scott - converted to vil 00013 //\endverbatim 00014 00015 #include <vil/file_formats/vil_jpeglib.h> 00016 class vil_stream; 00017 00018 class vil_jpeg_compressor 00019 { 00020 public: 00021 struct jpeg_error_mgr jerr; 00022 struct jpeg_compress_struct jobj; 00023 vil_stream *stream; 00024 00025 vil_jpeg_compressor(vil_stream *s); 00026 00027 // NB. does not delete the stream 00028 ~vil_jpeg_compressor(); 00029 00030 bool write_scanline(unsigned line, JSAMPLE const *); 00031 00032 void set_quality(int quality); 00033 int get_quality(); 00034 00035 private: 00036 bool ready; 00037 int quality; 00038 }; 00039 00040 #endif // vil_jpeg_compressor_h_