var
Streamalt, Streamalt2 : TStream;
Jpegalt, Jpegalt2 : TJPEGImage;
Bmpalt, Bmpalt2 : TBitmap;
begin
Streamalt := DMretaguarda.QConItem.CreateBlobStream(DMretaguarda.QConItemftpec1, bmRead);
try
Jpegalt := TJpegImage.Create;
Bmpalt := TBitmap.Create;
Jpegalt.LoadFromStream(Streamalt);
Bmpalt.Assign(Jpegalt);
ResizeBitMap(Bmpalt, FItem.foto1.Picture.Bitmap, FItem.foto1.Width, FItem.foto1.Height);
FItem.foto1.Visible := true;
Jpegalt.Free;
streamalt.free;
except
FItem.foto1.Visible := false;
Jpegalt.Free;
streamalt.free;
end;
end;
The following code is to read an image in the database (mysql), and play it in a TImage.
What I want is to treat this same field to see if it is empty, and if it is empty, do not send anything to my TImage.