19 lines
469 B
C++
19 lines
469 B
C++
|
|
#include <iostream>
|
|
#include <string.h>
|
|
#include "BMP.h"
|
|
using namespace std;
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
BMP readfrom(argv[1]);
|
|
unsigned char * data = new unsigned char[readfrom.getWidth() * readfrom.getHeight() * 3];
|
|
readfrom.read(data);
|
|
|
|
BMP bmp_create((string(argv[1], strlen(argv[1]) - 4) + "-2.bmp").c_str(),
|
|
readfrom.getWidth(),
|
|
readfrom.getHeight(),
|
|
data);
|
|
delete[] data;
|
|
}
|