I am trying to copy a region of a loaded image to a new
image and it seems that I am ddoing something wrong ...
Can anyone see what is wrong here ? thnks
here is my code .. :
ILuint img ;
ilGenImages( 1 , &img );
data = ilGetData();
if ( data == NULL )
cout << " data is Null " << endl;
img = ilSetData(data) ;
img = ilCopyPixels ( 10 , 10 ,0 , 128 , 128 , 1 ,
IL_RGB ,IL_UNSIGNED_BYTE, data ) ;
ilEnable ( IL_FILE_OVERWRITE) ;
ilSave(IL_BMP , "img/img.bmp" ) ;
Franz Richter .