Ver Mensaje Individual
  #1  
Antiguo 28-01-2005
Loviedo Loviedo is offline
Miembro
 
Registrado: dic 2004
Posts: 214
Reputación: 0
Loviedo cantidad desconocida en este momento
Visualizar BLOB

Este procedimiento funciona bien con tablas Paradox para visualizar Jpg con un Timage, pero con Firebird me sale el siguiente error:
'Invalid class Typecast'.
Tengo creado el Campo Blob de Firebird como
'BLOB SUB_TYPE 0 SEGMENT SIZE 2048'
tambien he probado con
'BLOB SUB_TYPE 0 SEGMENT SIZE 4096'
el tamaño del Jpg es de 38KB
Gracias anticipadas.

procedure TForm1.Button3Click(Sender: TObject);
var
BS: TBlobStream;
Graphic: TGraphic;
begin
if FDM.IBtable2foto.isnull then
Image1.picture.graphic:=nil
else
begin
BS:=TBlobStream.Create(FDM.IBtable2foto,bmread);
try
Graphic:= TJPEGImage.Create;
try
Graphic.LoadFromStream(BS);
Image1.picture.graphic:=Graphic;
Finally
Graphic.Free;
end;
Finally
BS.free;
end;
end;
end;
Responder Con Cita