aboutsummaryrefslogtreecommitdiff
path: root/test/main.cpp
blob: d1633b88f12a15bd372a81c74c00fcbf29332fdc (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
30
#include <reader.h>
#include <debug.h>
#include <PNGImage.h>
#include <BMPImage.h>
#include <WEBPImage.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];
	

	TehImage::WEBPImage webp;
	webp.readFromFile(infile);
	
	TehImage::BMPImage bmp(webp);
	bmp.writeToFile(outfile);
}