Background removal from reference image

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

Re: Background removal from reference image

Post by snibgo » 2018-12-11T08:59:22-07:00

Command interpreters (bash, Windows etc) break commands at spaces, except where the space is within a quoted string. So one version of your command has quotes.

Personally, I don't have spaces in filenames. This saves some grief.
snibgo's IM pages: im.snibgo.com

classic12
Posts: 3
Joined: 2018-12-11T07:51:59-07:00
Authentication code: 1152

Re: Background removal from reference image

Post by classic12 » 2018-12-11T09:09:55-07:00

Sorry corrected the last one replace space with "-"
for oldname in *
do
newname=`echo $oldname | sed -e 's/ //g'`
mv "$oldname" "$newname"
done

ptamanekar
Posts: 1
Joined: 2018-12-21T06:40:05-07:00
Authentication code: 1152

Re: Background removal from reference image

Post by ptamanekar » 2018-12-21T06:42:05-07:00

Use double quotes for file names

Post Reply