34 #include <Base/Image/ImageBase.hh>
35 #include <Base/Image/ImageIO.hh>
36 #include <Base/Image/CompressJpeg.hh>
41 int main(
int argc,
char *argv[])
44 cout <<
"Usage: " << argv[0] <<
" <image file>" << endl;
55 BIASERR(
"Reading JPEG failed (returned "<< res <<
")!");
60 BIASERR(
"Decompression failed (returned "<< res <<
")!");
64 cout <<
"Image size: " << image.
GetWidth() <<
"x"
69 cout <<
"Image metadata:" << endl;
72 cout <<
"No image metadata found." << endl;
Wrapper for fast libjpeg methods.
int ReadJPEG(const std::string &filename)
Read JPEG file named filename and store its informations in compressed data field.
unsigned int GetWidth() const
unsigned int GetChannelCount() const
returns the number of Color channels, e.g.
unsigned int GetHeight() const
int Decompress(BIAS::Image< unsigned char > &destImg, bool readComment=false)
Start decompression of previously given data (from ReadJPEG() or SetCompressedData()), results will be stored in destination image.
int Init(long size=10485760)
Initialize object with standard values and limit shared memory area to given size (in byte...