37 #include <Base/Image/ImageBase.hh>
38 #include <Base/Image/ImageConvert.hh>
39 #include <Base/Image/ImageIO.hh>
46 unsigned int size=2048;
48 unsigned int chess_field_size=128;
49 unsigned int x=0, y=0, c=0, r=0;
50 unsigned char color=0;
51 unsigned char **ida=im.GetImageDataArray();
55 for (y=chess_field_size; y<=im.GetHeight(); y+=chess_field_size){
56 for (x=chess_field_size; x<=im.GetHeight(); x+=chess_field_size){
57 if (y==chess_field_size)
58 color = (color==0) ? (
unsigned char)255 : (
unsigned char)0;
60 color = (ida[y-chess_field_size-1][x-1]==0) ?
61 (
unsigned char)255 : (
unsigned char)0;
62 for (r=1; r<=chess_field_size; r++){
63 for (c=1; c<=chess_field_size; c++){
72 BIASERR(
"error writing image ");
77 BIASERR(
"error exporting image ");
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.