Page 1 of 1

merge all convert to one

Posted: 2016-03-15T06:06:08-07:00
by hmakani
Hello,
I need help to merge convert command due to optimization. We have command for resize, white remove, black remove , flip ,flop etc and merge.
below are sample code. Does it will improve speed ?

Code: Select all

 
convert logo.png -resize 176x172\! temp-img-1-1458046351068348700.mpc
convert temp-img-1-1458046351068348700.mpc -fuzz 20% -transparent white virtual_temp_images/temp-img-1-1458046351068348700.mpc
convert logo2.png -resize 216x46\! temp-img-2-1458046351068348700.mpc
convert temp-img-2-1458046351068348700.mpc -fuzz 20% -transparent white temp-img-2-1458046351068348700.mpc
convert -size 216x172 xc:none temp-img-1-1458046351068348700.mpc -geometry +20.6666+0 -composite temp-img-2-1458046351068348700.mpc -geometry +0.666666+64 -composite temp-image1458046351068348700.mpc
I am using: ImageMagick 6.9.3-0 Q8 i686
Do I use clone or mpr ?
Please advice.

Thanks,

Re: merge all convert to one

Posted: 2016-03-15T07:29:42-07:00
by snibgo
It looks simple. I assume the only required output is from the final convert? Or do you also want the intermediate results?

If I merged them, I'd probably make a minor mistake that would take forever to resolve. But if you provide logo.png, logo2.png and the required output, we could do this.

Re: merge all convert to one

Posted: 2016-03-15T21:02:51-07:00
by hmakani
Hello Snibgo,
Thanks for quick reply. I will provide logo1,logo2 and final temp-image1458046351068348700.mpc is needed. There is no need for intermediate results.
I have given try for following code but fail to get desire result.

Code: Select all

convert logo1.png -respect-parentheses  \( +clone -resize 176x172! \) \( +clone -fuzz 20% -transparent white \) -delete 0-1  -size 216x172 xc:none -geometry +20.6666+0 -composite  final.png
In above code , I am fail to get image of 216x172 size and How will I add process for logo2 and so on. I need to optimize command for speed .

Thanks,