IW question

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

IW question

Postby hadipardis » August 7th, 2007, 11:56 am

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
hadipardis
Junior Member
Junior Member
 
Posts: 33
Joined: July 17th, 2004, 5:45 am

Postby Kambiz » August 7th, 2007, 12:20 pm

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;
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby hadipardis » August 7th, 2007, 12:23 pm

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?
hadipardis
Junior Member
Junior Member
 
Posts: 33
Joined: July 17th, 2004, 5:45 am

Postby hadipardis » August 7th, 2007, 12:26 pm

Oh! My problem solved! Thx
hadipardis
Junior Member
Junior Member
 
Posts: 33
Joined: July 17th, 2004, 5:45 am


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest

cron