procedure TForm1.bbSaveAsClick(Sender: TObject);
var
jpgimage : Tjpegimage;
CurrentFile : TFileName;
begin
if SavePictureDialog.Execute then
CurrentFile := SavePictureDialog.FileName;
jpgimage := Tjpegimage.create;
if CurrentFile <> '' then
jpgimage.SaveToFile(CurrentFile);
jpgimage.Free;
end;
위와같이 하면 다른이름으로 저장은 되는데...jpg사이즈가 0이더라구요,..
어떻게해야하는지????
procedure TForm1.bbSaveAsClick(Sender: TObject);
var
jpgimage : Tjpegimage;
CurrentFile : TFileName;
begin
if SavePictureDialog.Execute then
CurrentFile := SavePictureDialog.FileName;
jpgimage := Tjpegimage.create;// 이미지생성. 현재 아무그림도 없음, 크기=0
if CurrentFile <> '' then
jpgimage.SaveToFile(CurrentFile); // 저장. 당연히 크기= 0
jpgimage.Free;
end;
==================================>
begin
...
jpgimage := Tjpegimage.create;
if CurrentFile <> '' then
begin
jpgimage.Assign(다른JpegImage);
jpgimage.SaveToFile(CurrentFile);
end;
jpgimage.Free;
end;
dol wrote:
> procedure TForm1.bbSaveAsClick(Sender: TObject);
> var
> jpgimage : Tjpegimage;
> CurrentFile : TFileName;
> begin
> if SavePictureDialog.Execute then
> CurrentFile := SavePictureDialog.FileName;
> jpgimage := Tjpegimage.create;
> if CurrentFile <> '' then
> jpgimage.SaveToFile(CurrentFile);
> jpgimage.Free;
> end;
>
> 위와같이 하면 다른이름으로 저장은 되는데...jpg사이즈가 0이더라구요,..
> 어떻게해야하는지????
>