1 #include <Base/Image/ImageIO.hh>
8 int main(
int argc,
char *argv[])
10 const unsigned width=640, height=480, cc=1;
11 const bool interleaved =
true;
17 const string fname=
"float_img.mip", ucname=
"unsigned_char_image.mip";
19 cerr <<
"Error saving float image\n";
23 cerr <<
"Error saving unsigned char image\n";
29 cerr <<
"Error reloading float image into Image<float>\n";
33 cerr <<
"Error reloading unsigned char image into Image<unsigned char>\n";
37 cerr <<
"Error reloading float image into ImageBase with StorageType "
42 cerr <<
"Error reloading unsigned char image into ImageBase with "
43 <<
"StorageType unsigned char \n";
49 cerr <<
"Error: Loaded unsigned char image into Image<float> "
54 cerr <<
"Error: Loaded float image into Image<unsigned char> without "
59 cerr <<
"Error: Loaded unsigned char image into ImageBase with StorageType "
60 <<
"float without error\n";
64 cerr <<
"Error: Loaded float image into ImageBase with StorageType "
65 <<
"unsigned char without error\n";
72 cerr <<
"Error loading unsigned char image into ImageBase with "
73 <<
"StorageType unknown\n";
77 cerr <<
"Error loadingfloat image into ImageBase with "
78 <<
"StorageType unknown\n";
82 if (argc==1){ cout <<
"OK\n"; }
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.
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
(8bit) unsigned char image storage type
This is the base class for images in BIAS.