IW question

Posted:
August 7th, 2007, 11:56 am
by hadipardis
Hi,
How can I rotate an image with a specific Resampling method using IW?
Could you please give me a full example? I saw the IW demo but I mixed up! Thx

Posted:
August 7th, 2007, 12:20 pm
by Kambiz
Using TImageWork component:
- Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
with ImageWork1 do
begin
with Transform do
begin
Resample := rsBilinear;
Transformations.Clear;
with Transformations.Add do
begin
Kind := tkRotate;
Angle := 45;
end;
end;
ApplyTransform(Image1.Picture.Graphic);
Image2.Picture.Assign(Output);
end;
end;
Using ImageWork's RotateImage function:
- Code: Select all
procedure TForm1.Button2Click(Sender: TObject);
begin
RotateImage(Image2.Picture.Bitmap, Image1.Picture.Graphic, 45, rsBilinear);
end;

Posted:
August 7th, 2007, 12:23 pm
by hadipardis
Thanks! But how can I use the rotated image in order to copy its content into a matrix? or how can I cut the redundant corners of this rotated image?

Posted:
August 7th, 2007, 12:26 pm
by hadipardis
Oh! My problem solved! Thx