VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1[2]345678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 06:48:20 02/02/04 Mon
Author: Daniel Meier
Subject: Re: Rotate Multi tiff - color become darker
In reply to: Daniel Meier 's message, "Rotate Multi tiff - color become darker" on 06:44:45 02/02/04 Mon

Sorry but whit the Code the post failed

procedure TForm3.Drehen(grad : Integer);
var
Transform : TRotateTransform;
FileHandle : THandle;
i : Integer;
PageNumber : Integer;

NewGraphic : TTiffGraphic;
Graphic : TTiffGraphic;
ImageNo : Integer;

begin
PageNumber := StrToInt(PageEdit.Text);
Form3.PageEdit.Enabled:= False;
FUndoGraphic.Assign(ImageScrollBox.Graphic);
Transform := TRotateTransform.Create;
try
Transform.Angle := grad;
Transform.ApplyOnDest(FUndoGraphic, ImageScrollBox.Graphic);
finally
Transform.Free;
end;
ImageScrollBox.Redraw(True);

If Form1.FMultiPageFileName <> '' then
begin
NewGraphic := TTiffGraphic.Create;
Graphic := TTiffGraphic.Create;

for ImageNo := 1 to Form3.ImageScrollBox.ImageCountFromFile(Form1.FMultiPageFileName) do
begin
Graphic.ImageToLoad := ImageNo;
Graphic.LoadFromFile(Form1.FMultiPageFileName);

if ImageNo = 1 then
if StrToInt(PageEdit.Text) = 1 then
ImageScrollBox.SaveToFile(Form1.FMultiPageFileName + '.tiff')
else
Graphic.SaveToFile(Form1.FMultiPageFileName + '.tiff')
else
if ImageNo = StrToInt(PageEdit.Text) then
begin
ImageScrollBox.AppendToFile(Form1.FMultiPageFileName + '.tiff');

end
else
Graphic.AppendToFile(Form1.FMultiPageFileName + '.tiff');
end;

DeleteFile(Form1.FMultiPageFileName);
RenameFile( Form1.FMultiPageFileName + '.tiff', Form1.FMultiPageFileName);
Graphic.Free;
NewGraphic.Free;
end
else // Tiff one Page
begin
if FileExists(Form1.FFileName) then
DeleteFile(Form1.FFileName);
ImageScrollBox.SaveToFile(Form1.FFileName);
end;


// ############# and finaly load
if ImageScrollBox.ImageCountFromFile(Form1.FMultiPageFileName) <> 1 then
ImageScrollBox.LoadFromFile(Form1.FMultiPageFileName, PageNumber )
else
ImageScrollBox.LoadFromFile(Form1.FMultiPageFileName, 1);
Form3.PageEdit.Enabled:= True;
Form3.Drehenaktiv := False;
end;

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:

  • Re: Rotate Multi tiff - color become darker -- Michel, 07:24:06 02/05/04 Thu
  • Re: Rotate Multi tiff - color become darker -- Michel, 20:50:27 02/08/04 Sun
    [ Contact Forum Admin ]


    Forum timezone: GMT-5
    VF Version: 3.00b, ConfDB:
    Before posting please read our privacy policy.
    VoyForums(tm) is a Free Service from Voyager Info-Systems.
    Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.