I'm using two bitmaps to draw graphs on them. After drawing I need to show bitmap pictures in two Images. Assigning bitmap to Image or drawing bitmap to Image sometimes causes Image to disappear (you can see form background). I have tried this:
Image->Picture->Bitmap->Assign(bitmap1);
Image2->Picture->Bitmap->Assign(bitmap2);
Image->Picture->Graphic = bitmap1;....
Image->Canvas->Draw(0,0,bitmap1);....
Image->Picture->Bitmap->Canvas->Draw(0,0,bitmap1);
If I don't have Sleep(100) between Image and Image2 redrawing, Image2 isn't visible for the most of the time. Also adding Image2->Refresh helps, but the issue still sometimes occurs to both Images.
If I save created bitmaps or Images to .jpeg files, all .jpeg images are correct and none of them are empty. Also Image->height, Image->picture->bitmap->height and width is always correct.
Can anyone tell me, what I'm doing wrong?