0
|
1 |
#include "Page.h"
|
|
2 |
#include <stdio.h>
|
|
3 |
|
|
4 |
int main(int argn, char **argv)
|
|
5 |
{
|
|
6 |
Page *Imatge;
|
|
7 |
|
|
8 |
pnm_init(&argn, argv);
|
|
9 |
|
|
10 |
if (argn >= 2)
|
|
11 |
Imatge = new Page(argv[1]);
|
|
12 |
else
|
|
13 |
Imatge = new Page("rotated.pbm");
|
|
14 |
|
|
15 |
//printf("B/W: %f\n", Imatge->ratioBlackWhite());
|
|
16 |
//Imatge->rotateMap(90);
|
|
17 |
//Imatge->writeMap("rotated.pbm");
|
|
18 |
//Imatge->tryAngles(-10,10,1);
|
|
19 |
|
|
20 |
/* Arreglem angle */
|
|
21 |
Imatge->rotateMap(Imatge->getSkew(10));
|
|
22 |
if (argn >= 3)
|
|
23 |
Imatge->writeMap(argv[2]);
|
|
24 |
|
|
25 |
//Imatge->getText();
|
|
26 |
}
|