Page 1 of 1

using "convert" and leaving same names

Posted: 2018-12-17T07:17:41-07:00
by qqmagi
Hi. how can I convert a folder with images at once? what command should I type if i want to save converted files to subdir?
i use command

Code: Select all

convert *.jpg -canny 0x1+10%+30% i*.jpg 
I want to keep original image names to converted files. i need a pair of converted and original files. how can i do it?

Also, how can I change color mode and make bg white and edges black?


thank you

Re: using "convert" and leaving same names

Posted: 2018-12-17T08:10:09-07:00
by snibgo
Please don't multi-post. I have deleted your other post.

Always state what version IM you use, on what platform.

To process multiple files, creating one output per input, use "mogrify".

Re: using "convert" and leaving same names

Posted: 2018-12-17T11:29:21-07:00
by qqmagi
snibgo wrote: 2018-12-17T08:10:09-07:00 Please don't multi-post. I have deleted your other post.

Always state what version IM you use, on what platform.

To process multiple files, creating one output per input, use "mogrify".
hi, i'm using 7.0.8-16 on mac os mojave

Re: using "convert" and leaving same names

Posted: 2018-12-17T11:34:08-07:00
by qqmagi
snibgo wrote: 2018-12-17T08:10:09-07:00 To process multiple files, creating one output per input, use "mogrify".
thank you! it works for me. appreciate!

how can I change an output colors? so i have white bg and black edges?

Re: using "convert" and leaving same names

Posted: 2018-12-17T11:52:42-07:00
by snibgo
Try "-negate". If your outputs are black and white, I suggest you write to png, not jpg.

Re: using "convert" and leaving same names

Posted: 2018-12-17T11:57:10-07:00
by fmw42
qqmagi wrote: 2018-12-17T11:34:08-07:00 how can I change an output colors? so i have white bg and black edges?
Please post an example image to some free hosting service and put the URL here. That way we can see exactly what you are trying to do.

Re: using "convert" and leaving same names

Posted: 2018-12-17T12:06:00-07:00
by qqmagi
fmw42 wrote: 2018-12-17T11:57:10-07:00
qqmagi wrote: 2018-12-17T11:34:08-07:00 how can I change an output colors? so i have white bg and black edges?
Please post an example image to some free hosting service and put the URL here. That way we can see exactly what you are trying to do.
here you go https://imgur.com/7HcEPJR
I just want to invert colors. i want edges to be black and bg to be white

Re: using "convert" and leaving same names

Posted: 2018-12-17T12:33:53-07:00
by fmw42
OK. Then snibgo's suggestion of adding -negate to your mogrify command should do what you want.

Re: using "convert" and leaving same names

Posted: 2018-12-17T12:56:31-07:00
by qqmagi
fmw42 wrote: 2018-12-17T12:33:53-07:00 OK. Then snibgo's suggestion of adding -negate to your mogrify command should do what you want.
yes! worked. thanks a lot all of you guys!
i have only one issue here. morgify doesn't work with negate. -negate works works well 'convert' and renames files=(

Re: using "convert" and leaving same names

Posted: 2018-12-17T13:45:23-07:00
by fmw42
This works fine for me using IM 6.9.10.16 Mac OSX

Code: Select all

mogrify -negate lenax.png
What is your exact command line and what version of ImageMagick and platform? Your syntax is likely wrong.

Re: using "convert" and leaving same names

Posted: 2018-12-18T05:40:17-07:00
by qqmagi
fmw42 wrote: 2018-12-17T13:45:23-07:00 This works fine for me using IM 6.9.10.16 Mac OSX

Code: Select all

mogrify -negate lenax.png
What is your exact command line and what version of ImageMagick and platform? Your syntax is likely wrong.
i'm using 7.0.8-16 on mac os mojave

i was typing

Code: Select all

convert -negate *.jpg

Re: using "convert" and leaving same names

Posted: 2018-12-18T10:59:49-07:00
by fmw42
You need to use magick mogrify on IM 7 not convert