I have the following code in a Delphi procedure. It works fine when I load a .bmp file but when I load a jpg, png or gif, although I can properly display the loaded image (by putting the picture into a visible Timage, I can't access the bitmap that I need to pass to my AddBitMap procedure.
Obviously I'm doing something wrong but I've tried everything I can think of to no avail!
Does anyone have the answer that has eluded me?
img.Picture.LoadFromFile(dlgOpenPic1.FileName); // .jpg, .png, .gif, .bmp ??