MultiplyMatrices

function MultiplyMatrices(const current, new: TMatrixD): TMatrixD;


Note that matrix multiplication is not symmetric so it's important to submit the 'current' and 'new' parameters in the correct order.

uses Image32, Image32_PNG, Image32_Transform;
...
var
  img: TImage32;
  mat, mat2: TMatrixD;
  s,c: double;
begin
  img := TImage32.Create;
  img.LoadFromFile('beetle.png');
    
  mat := IdentityMatrix;
  //vertical skew
  mat[0, 1] := -0.5;
  //and rotation too
  SinCos(angle45, s, c);
  mat2 := IdentityMatrix;
  mat2[0, 0] := c;   mat2[1, 0] := s;
  mat2[0, 1] := -s;  mat2[1, 1] := c;
  mat := MultiplyMatrices(mat, mat2);

  AffineTransform(img, mat);

  img.SaveToFile('beetle_affine.png');
  img.Free;
end;