C++ library for merging images -
i need merge couple of images image2 covers parts of image1 , on. found cimg library couldn't find out how use purposes.
is there other library use or may achieve cimg?
i created 2 images imagemagick:
convert -size 400x300 gradient:blue-yellow png24:gradient.png
convert -size 100x100 xc:fuchsia overlay.png
and ran cimg
code:
#define cimg_use_png #define cimg_display 0 #include "cimg.h" using namespace cimg_library; int main() { cimg<unsigned char> gradient("gradient.png"); cimg<unsigned char> overlay("overlay.png"); gradient.draw_image(150,50,overlay); gradient.save_png("result.png"); }
and got this:
Comments
Post a Comment