unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, ExtDlgs, Imaging, ImagingClasses, ImagingTarga, ImagingTypes;

type
  TForm2 = class(TForm)
    ImgSave: TSavePictureDialog;
    ScrollBox1: TScrollBox;
    DestImg: TImage;
    procedure DestImgDblClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.DestImgDblClick(Sender: TObject);
var img:TImageData; st:TMemoryStream;
begin
 if ImgSave.Execute then begin
  st := TMemoryStream.Create;
//  DestImg.Picture.Bitmap.PixelFormat := pf24bit;
  DestImg.Picture.Bitmap.SaveToStream(st);
  st.Position := 0;
  LoadImageFromStream(st, img);
  st.Free;
  SaveImageToFile(ImgSave.FileName, img);
  FreeImage(img);
 end;
end;

end.
