Ver Mensaje Individual
  #1  
Antiguo 23-12-2007
ascrnet ascrnet is offline
Miembro
 
Registrado: mar 2007
Posts: 41
Reputación: 0
ascrnet Va por buen camino
Exclamation Problema con este truco jpg a image

holas

he estado tratando de poner mi jpg que tengo en la base de datos a un image1. para esto uso el siguiete

Código:
 procedure TForm1.Button2Click(Sender: TObject);
 var
    Jpeg:TJpegImage;
    Corriente:TMemoryStream;
 begin
    {Creamos un TJpegImage y una TMemoryStream}
    {Para uso temporal}
    {We crate a TJPejImage and a TMemoryStream}
   {To Temporal use}
    Jpeg:=TJpegImage.create;
    Corriente:=TMemoryStream.create;
    {Grabamos el campo binario a la stream}
    {Save the binary field in the stream}
    Table1Imagen.SaveToStream(Corriente);
    {Rebobinamos Ccorriente}
    {Rewind the stream}
    Corriente.Seek(0,soFromBeginning);
    {Cargamos Corriente en el TJpegImage}
    {Load the stream into the TJpegImage}
    Jpeg.LoadFromStream(Corriente);
    {y asignamos el TJPegImage al Image1 de la form}
    {Assign the TJpegImage to the Image1 of the form}
    Image1.Picture.Assign(Jpeg);
    {Liberamos cosas temporales}
    {Free the temporal things}
    Corriente.Free;
    Jpeg.Free;
 end;
fuente : http://www.q3.nu/trucomania/truco.cgi?216&esp

me da error en [Error] Unit1.pas(154): Undeclared identifier: 'Table1Imagen'

la pregunta cual es ese componente Table1Imagen , dicen que es una tabla

pd.: uso delphi 7 con Firebird.

saludos
Responder Con Cita