Community
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
Hi Darcy,
Here is a sample code snippet to explain this :
AcGiImageBGRA32 giImage; AcGiPixelBGRA32 *pixels = new AcGiPixelBGRA32[ImageWidth * ImageHeight]; for (int i = 0; i < ImageWidth; i++) { for (int j=0; j < ImageHeight; j++) { pixels[(j * ImageWidth) + i].setBGRA(blue, green, red, alpha); } } giImage.setImage(ImageWidth, ImageHeight, pixels);
Regards,
Balaji
What happens to the new AcGiPixelBGRA32 Array?
When I create it in Line:
AcGiPixelBGRA32 *pixels = new AcGiPixelBGRA32[ImageWidth * ImageHeight];
I have to delete it at some point.
When I do this, then AutoCAD crashes.
What is wrong?