37 #include <Base/Image/ImageBase.hh>
38 #include <Base/Image/Image.hh>
39 #include <Base/Image/ImageIO.hh>
41 #ifndef BIAS_HAVE_IMAGEMAGICKLIB
42 # error BIAS_HAVE_IMAGEMAGICKLIB not defined. Recompile BIAS with ImageMagick
49 void usage(
int argc,
char** argv)
52 if (argc>0) cerr<<argv[0]<<
" <image-filename>"<<endl;
55 int main(
int argc,
char** argv)
64 string filename=argv[1];
75 BIASERR(
"an error occurred using ExportImage");
80 BIASERR(
"an error occurred writing mip");
static int ImportMagickPPAutoconvert(const std::string &FileName, ImageBase &result, const bool &assumeGrey=false, const bool &readMetaData=false)
Reads an image from disk using the ImageMagick++ library.
static int ExportMagickPP(const std::string &FileName, const ImageBase img, const int &quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool &writeMetaData=false, const bool &forceBinaryPNMformat=true, const bool &losslesJpgMode=false, const bool &writeGZipped=false, const std::string &comment=std::string(""))
Reads an image from disk using the ImageMagick++ library.
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.