I have defined:
typedef unsigned char uint8;
#define IMG_TYPE_DEF(typeName) struct {\
size_t w;\
size_t h;\
typeName* data;\
}
typedef IMG_TYPE_DEF(uint8) ImageU8;
typedef ImageU8 Image;
And in main :
void gradient(const Image* src){
uint8* pPrev = src->data - src->w;
...
My aim is to rewrite this code from c to java. I have problem with data types. Can unsigned char be just a char or int? And if yes, how i should deal with this line, i do not understand it:
uint8* pPrev = src->data - src->w;
For example if src->w=900 what is heppening?