38 #include <Base/Image/ImageBase.hh>
39 #include <Base/Image/ImageConvert.hh>
40 #include <Base/Image/ImageIO.hh>
47 unsigned int size=1024;
50 unsigned int chess_field_size=128;
51 unsigned int x=0, y=0, c=0, r=0;
52 unsigned char color=0;
57 for (y=chess_field_size; y<=im->
GetHeight(); y+=chess_field_size){
58 for (x=chess_field_size; x<=im->
GetHeight(); x+=chess_field_size){
59 if (y==chess_field_size)
60 color = (color==0) ? (
unsigned char)255 : (
unsigned char)0;
62 color = (ida[y-chess_field_size-1][x-1]==0) ?
63 (
unsigned char)255 : (
unsigned char)0;
64 for (r=1; r<=chess_field_size; r++){
65 for (c=1; c<=chess_field_size; c++){
90 BIASERR(
"error writing image ");
int InitWithForeignData(unsigned int width, unsigned int height, unsigned int channels, void *data, const bool interleaved=true, const bool shouldRelease=true)
This is used to construct a BIAS::Image hull around existing image data.
unsigned int GetWidth() const
unsigned int GetChannelCount() const
returns the number of Color channels, e.g.
unsigned int GetHeight() const
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.
const StorageType * GetImageData() const
overloaded GetImageData() from ImageBase
void ClearDataPointer()
set data pointer to NULL, such that image IsEmpty without deletion of data.
const StorageType ** GetImageDataArray() const
overloaded GetImageDataArray() from ImageBase