On 10/02/2017 at 02:43, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform:
Language(s) : C++ ;
---------
Hi all,
could one of the fine folk here please provide an example of how we can set bitmap image data for proper 32bit images? Something like this (but in 32bit data land!) would help:
// psuedo code
void MyDialog::GetImageData(int width,int height,BaseBitmap* bmp)
{
UCHAR *img = gNew UCHAR[width*height*3];
// set one pixel to grey
img[7*14 + 36 + 0] = 128; // R
img[7*14 + 36 + 1] = 128; // G
img[7*14 + 36 + 2] = 128; // B
for(int h = 0; h < height;)
{
bmp->SetPixelCnt(o,h,width,(UCHAR* )img[h * width],COLORBYTES_RGB,COLORMODE_RGB,PIXELCNT_0);
h++;
}
// free container etc.
}
Also, could they clarify what data range the image data should be in? E.g. 0.0 - 1.0 or 0 - 4294967295.
Cheers,
WP.