How to use the ImageMagick IO routines directly instead of all vailable routines from BIAS::ImageIO::Load
- Author
- Jan Woetzel
#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#ifndef BIAS_HAVE_IMAGEMAGICKLIB
# error BIAS_HAVE_IMAGEMAGICKLIB not defined. Recompile BIAS with ImageMagick
#endif
using namespace std;
using namespace BIAS;
void usage(int argc, char** argv)
{
cerr<<"usage: ";
if (argc>0) cerr<<argv[0]<<" <image-filename>"<<endl;
}
int main(int argc, char** argv)
{
if (argc!=2) {
usage(argc, argv);
return 0;
};
BIASASSERT(argc>1);
string filename=argv[1];
BIASERR("an error occurred using ExportImage");
};
BIASERR("an error occurred writing mip");
};
cout<<"done"<<endl;
return 0;
}