Vb, Delphi, .net, framework, C++, Java, Pascal,Visual Studio, Asm, Ruby, C#, j#, Cs, Html, Php, Perl, Asp, xHtml Get Free Souce Code Here...



Rotate an image by 90º

You have to create two images first. I'm sure anyone could convert this code to use just on image by using a TBitmap.

Procedure TurnImage(Src, Dst: TImage);
var x,y: integer;
begin
  Dst.Width:= Src.Height; Dst.Height:= Src.Width;
  For x:= 0 to Src.Width-1 do begin
    For y:= 0 to Src.Height-1 do begin
      Dst.Canvas.Pixels[(Src.Height-1)-y,x]:= Src.Canvas.Pixels[x,y];
    end;
  end;
end;

0 comments:

Post a Comment