VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345678[9]10 ]


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

Date Posted: 07:47:51 11/08/00 Wed
Author: Michel
Subject: Re: Rotating image
In reply to: John Taylor 's message, "Rotating image" on 10:23:43 11/07/00 Tue


Hi John,

Yes, it is possible to rotate an image without displaying it, nor using the TImageScrollBox. With multipage files though, you will need to create a new file, as you can only append to the end of a file. Here is a basic structure to do this:

var

SourceGraphic : TTiffGraphic;
DestGraphic : TTiffGraphic;

SourceFile : TFileStream;
DestFile : TFileStream;

begin

SourceFile := TFileStreamCreate.Create(..., fmOpenRead);
DestFile := TFileStream.Create(..., fmCreate);

for ImageNo := 1 to SourceFile.GetImageCount(SourceFile) do
begin
SourceGraphic.SingleLoadFromStream( SourceFile, ImageNo );

create a TRotateTransform with appropriate angle

RotateTransform.ApplyOnDest( SourceGraphic, DestGraphic );

DestGraphic.AppendToStream(DestFile);

end;

> Hello Michel,
>
> I am a new user. Is there an easy way to rotate a
> particular page in a multi-page tiff and then save the
> result without displaying the image at all or using
> ImageScrollbox at all ?
>
> thanks.

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


Replies:

  • Re: Rotating image -- Chinthaka, 06:16:47 12/18/00 Mon
  • Re: Rotating image -- Michel, 07:27:25 12/18/00 Mon
    [ Contact Forum Admin ]


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