Ver Mensaje Individual
  #1  
Antiguo 20-05-2008
kapullok_2006 kapullok_2006 is offline
Miembro
 
Registrado: mar 2007
Posts: 90
Reputación: 18
kapullok_2006 Va por buen camino
Unhappy Guardar Picture de TImage en un archivo bmp

Hola, sé como se guarda el picture del Timage en un fichero. Lo que pasa es que se me queda pillado la aplicacion cuando pincho el boton, que hace para guardar el picture en un bmp.

Os enseño parte de mi código:

Código Delphi [-]

//IMPRIMIMOS
 else if dialogo_mostrado=2 then
 begin
  n:= 0;
  while n < cantidades.Count do
  begin


      if (Ventana_Foto_Concreta_Form.Image1.Visible=true) then
      begin

       DeleteFile('C:\fichero.bmp');
           Ventana_Foto_Concreta_Form.Image1.Picture.SaveToFile('C:\fichero.bmp');

      end

      else if(Ventana_Foto_Concreta_Form.ImageEfecto1.Visible=true) then
      begin
       DeleteFile('C:\fichero.bmp');
       Ventana_Foto_Concreta_Form.ImageEfecto1.Picture.SaveToFile('C:\fichero.bmp');

      end

      else
      begin

      end;

      if StrToInt(cantidades.Strings[n])>0 then
      begin
       PonerFaenaImpresion('C:\fichero.bmp',StrToInt(cantidades.Strings[n]));
       Inc(n);
      end;
      
   end;

  end

Tanto Image1 como ImageEfecto1 provienen de la clase Timage.
He probado por ejemplo con Image1.free despues de salvar el Image1, y sale algun error de alguna instruccion.
Tambien pruebo, despues de salvar, y si libero con Image1.picture.free , también error de instruccion.

Saludos.
Responder Con Cita