Page 1 of 1

Magick++ equivlent of terminal command.

Posted: 2019-07-10T19:14:23-07:00
by TheMohawkNinja

I have successfully written a C++ program for Linux that imitates the fade transitions for wallpapers in Windows 10. However, it uses a terminal command to do the compositing as I can't figure out how to do it in C++. I would like to do it in C++, as I believe it would be much faster due to it being compiled rather than interpreted.

The command that I need a Magick++ translation of is (this sits in a for loop that runs 20 times, hence the 'i*5' bit):

Code: Select all

composite -blend (i*5) newpic ~/Pictures/resizeOld.jpg ~/Pictures/transition.jpg
Thank you,

Re: Magick++ equivlent of terminal command.

Posted: 2019-07-11T05:44:54-07:00
by snibgo
What version of IM, on what platform?

A compiled program would be faster than your script because it would not start a program 20 times, nor read the same inputs 20 times. But you can have one command that reads the files once then writes 20 outputs. That is how I would do it. It would be the same speed as a compiled program.

I suggest you use "magick" (or "convert" for v6), not "composite".