#include <stdio.h>
#include <stdlib.h>

#include "Matrix2D.h"

int main(int argc, char *argv[])
{
  TMatrix2D matR,matG,matB;  
  TMatrix2D matT;
  int       i,j;
  
  matR= Mat2D_createNull();
  matG= Mat2D_createNull();  
  matB= Mat2D_createNull();
  Mat2D_loadRGBFromTGA(matR,matG,matB,"test.tga");

  matT= Mat2D_createNull();
  Mat2D_makeHMatZoomRotationTranslation(matT,3,2,0.3,1.01);
  
  Mat2D_charValue= 0; // Background color
  Mat2D_applyHMatTransformationHQ(matR,matT);
  Mat2D_applyHMatTransformationHQ(matG,matT);
  Mat2D_applyHMatTransformationHQ(matB,matT);
    
  Mat2D_saveRGBToTGA(matR,matG,matB,"out.tga"); 
  
  Mat2D_destroy(&matT);
  Mat2D_destroy(&matR);
  Mat2D_destroy(&matG);
  Mat2D_destroy(&matB);
  
  return 0;
}

