using "convert" and leaving same names

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
qqmagi
Posts: 6
Joined: 2018-12-17T06:56:51-07:00
Authentication code: 1152

using "convert" and leaving same names

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: using "convert" and leaving same names

Post 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".
snibgo's IM pages: im.snibgo.com
qqmagi
Posts: 6
Joined: 2018-12-17T06:56:51-07:00
Authentication code: 1152

Re: using "convert" and leaving same names

Post 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
qqmagi
Posts: 6
Joined: 2018-12-17T06:56:51-07:00
Authentication code: 1152

Re: using "convert" and leaving same names

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: using "convert" and leaving same names

Post by snibgo »

Try "-negate". If your outputs are black and white, I suggest you write to png, not jpg.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: using "convert" and leaving same names

Post 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.
qqmagi
Posts: 6
Joined: 2018-12-17T06:56:51-07:00
Authentication code: 1152

Re: using "convert" and leaving same names

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: using "convert" and leaving same names

Post by fmw42 »

OK. Then snibgo's suggestion of adding -negate to your mogrify command should do what you want.
qqmagi
Posts: 6
Joined: 2018-12-17T06:56:51-07:00
Authentication code: 1152

Re: using "convert" and leaving same names

Post 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=(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: using "convert" and leaving same names

Post 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.
qqmagi
Posts: 6
Joined: 2018-12-17T06:56:51-07:00
Authentication code: 1152

Re: using "convert" and leaving same names

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: using "convert" and leaving same names

Post by fmw42 »

You need to use magick mogrify on IM 7 not convert
Post Reply