00001 #ifndef ICEIMAGECOMPRESSION_H 00002 #define ICEIMAGECOMPRESSION_H 00003 00004 #include "Image/Image.H" 00005 #include "Image/PixelsTypes.H" 00006 #include <stdio.h> 00007 #include <jpeglib.h> 00008 #include "Ice/ImageIce.ice.H" 00009 00010 00011 00012 00013 00014 class IceImageCompressor 00015 { 00016 public: 00017 IceImageCompressor(); 00018 00019 std::vector<unsigned char> CompressImage(Image<PixRGB<byte> > input); 00020 00021 private: 00022 00023 //Structure to hold all of our jpeg compression parameters 00024 struct jpeg_compress_struct cinfo; 00025 00026 //Structure to handle all of our errors 00027 struct jpeg_error_mgr jerr; 00028 00029 GLOBAL(void) InitImageIceDest(std::vector<unsigned char>* destination_buffer); 00030 00031 00032 00033 }; 00034 00035 #endif 00036