Why does not update the color?
Posted: Fri Jul 02, 2004 4:22 pm
Hello!
I tried to create a new ADMImageRef and fill it with some color. The code is:
ADMImageRef GetImage(int width, int height)
{
ASPoint pixelPoint;
ASRGBColor color;
ADMImageRef imageRef = sADMImage->CreateBitmap(width,height);
sADMImage->BeginBaseAddressAccess(imageRef);
for (long i=0; i<width;i++) for(long j=0;j<height;j++) {
pixelPoint.v=i;
pixelPoint.h=j;
color.red = 100;
color.blue = 100;
color.green = 100;
sADMImage->SetPixel(ImageRef , &pixelPoint, &color);
}
sADMImage->EndBaseAddressAccess(ImageRef);
return ImageRef;
}
But the problem is that it never displey corrected. Actually the pixel are not updated. (in the debug mode the pixels have (0,0,0) color and not (100, 100, 100) as it should be).
Does anyone know how to do it?
I tried to create a new ADMImageRef and fill it with some color. The code is:
ADMImageRef GetImage(int width, int height)
{
ASPoint pixelPoint;
ASRGBColor color;
ADMImageRef imageRef = sADMImage->CreateBitmap(width,height);
sADMImage->BeginBaseAddressAccess(imageRef);
for (long i=0; i<width;i++) for(long j=0;j<height;j++) {
pixelPoint.v=i;
pixelPoint.h=j;
color.red = 100;
color.blue = 100;
color.green = 100;
sADMImage->SetPixel(ImageRef , &pixelPoint, &color);
}
sADMImage->EndBaseAddressAccess(ImageRef);
return ImageRef;
}
But the problem is that it never displey corrected. Actually the pixel are not updated. (in the debug mode the pixels have (0,0,0) color and not (100, 100, 100) as it should be).
Does anyone know how to do it?