Hello ImageEn-Team,
I want to create a segmented bar in a layer, where each segnment is painted in a different color.
To do this I tried to paint each pixel of the specific layer in one color using the bitmap of image layers. For this I used to for loops for the size of the rectangle to paint:
ImageEnView1->CurrentLayer->Bitmap->PixelFormat = ie24RGB;
for (int x = 1; x < PixelWidthRec/2 ; x++)
{
for (int y = 1; y < PixelHeightRec; y++)
{
ImageEnView1->CurrentLayer->Bitmap->Pixels_ie24RGB[x, y] = TColor2TRGB(clRed);
}
}
based on the example given in https://www.imageen.com/help/index.php?topic=TIEBitmap.Pixels. But this gives me the error message
[bcc32 mistake] E2034 converting from 'TRGB' to 'int' not possible
which stumped me tbh.
For testing purposes I tried reversing the equation to:
TColor TempColor = TRGB2TColor(ImageEnView1->CurrentLayer->Bitmap->Pixels_ie24RGB[x, y]);
which gave me the error message
[bcc32 Fehler]E2193 Not enough parameter to call '_fastcall TIEBitmap::GetPixels(int,int)'
Is approach correct and did I miss anything to get these error messages? And is there another way to color pixels in a layer?
With best regards
Stefan