Johannes M Zmoelnig wrote:
it works perfectly but you have to know, that "image" is the destination, whereas the data passed to the "from"-function is the source (thus the naming)
so i think that imageStruct being the "destination", is not a bad idea. however there might be several things that could be improved:
1) rescaling while converting; this would mean imageStruct::fromRGBA(uchar* rgbadata, int orgwidth, int orgheight); the destination-size would then be specified as imageStruct::xsize and imageStruct::ysize;
2) converting from other images imageStruct::from(imageStruct); so we don't have to worry at all, which format the input-data is in.
mfg.a.sdr IOhannes