I'm trying with ImageMagick GraphicsMagick and CImg but it takes 10 minutes to complete 10,000 images.
I need to do this in 3 minutes.
How I could do this task faster?
This is my code:
#define cimg_use_png
#define cimg_display 0
#include "CImg.h"
#include <iostream>
#include <vector>
using namespace cimg_library;
int main() {
for (int i = 0; i < 10000; ++i){
CImg<unsigned char> gradient("gradient.png");
CImg<unsigned char> overlay("overlay.png");
gradient.draw_image(80,150,overlay);
gradient.save_png("result.png");
}
}
How I could do this faster using other libraries or another language? I have a 2 Ghz processor and 4 GB of RAM.
Please Help Me