We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
procedure LoadImageFromDB(ABlobField: TField; AImage: TImage); var NewGraphic: TGraphicClass; GraphicClass: TGraphicExGraphicClass; Stream : TStream; begin Stream := ABlobField.DataSet.CreateBlobStream(ABlobField, bmRead); // for some reason, Size is ALWAYS 0 however, it STILL // goes into the block ???..??? if (Stream.Size > 0) then begin Stream.Position := 0; GraphicClass := FileFormatList.GraphicFromContent(Stream); if GraphicClass = nil then raise EInvalidGraphic.Create('UnknownExtension'); NewGraphic := GraphicClass.Create; try AImage.Picture.Graphic := NewGraphic; finally NewGraphic.Free; end; AImage.Picture.Graphic.LoadFromStream(Stream); if AImage.Picture.Graphic <> nil then AImage.Picture.Graphic := nil; AImage.Picture.Graphic := NewGraphic; end; end;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|LAN or WAN ?||11||120|
|Drag & Drop... Data from one grid to another||2||54|
|Delphi: barcode reading on android platform||1||100|
|how to continuously and automaticly add page tab title like 1st,2nd,3rd without limit?||2||41|
Join the community of 500,000 technology professionals and ask your questions.