aboutsummaryrefslogtreecommitdiff
path: root/test/main.cpp
blob: c02052686824a136dbcb939bd7a536be8c454502 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <reader.h>
#include <debug.h>
#include <PNGImage.h>
#include <BMPImage.h>
#include <zlib.h>
#include <cstdint>
#include <cstring>
#include <iostream>

using std::cout, std::endl;

int main(int argc, char* argv[])
{
	if(argc < 3)
	{
		cout << "usage: " << argv[0] << " <in file> <out file>" << endl;
		return 1;
	}
	
	std::string infile = argv[1];
	std::string outfile = argv[2];
	

	PNGImage png;
	png.readFromFile(infile);
	
	BMPImage bmp(png);
	bmp.writeToFile(outfile);
}