imagemagick,Smart person's trick?

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
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

imagemagick,Smart person's trick?

Post by leescott »

Someone would think command line tool like IM is difficult,but they cann't know IM'installation is more difficult.There are too many versions, I download and install ,but I can't know how to use it ,and how to download scripts from web ,how to use the portable version.And more ,how to configure ,how to build.
Is there an idiot handbook for installation and use ,teaching such things step by step?
I use windows XP.
Thanks!
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: imagemagick,Smart person's trick?

Post by leescott »

1,I want to try such things,but I don't know how to save and use morphology script.
viewtopic.php?p=41498#p41498
2,And,I want to learn how to convert such code to windows batchfile.(I often use windows batchfile.)

Code: Select all

convert duck.png \( duck_mask.gif -negate \) \
          -alpha off -compose CopyOpacity -composite \
          \( +clone -channel RGBA -blur 0x1 +channel -alpha off \) \
          +swap -compose Over -composite  duck_removal_blur.png
3, I download ImageMagick-i686-pc-cygwin.tar,but I can't install it.
I think, I unpacked the tar file. Then,if installation only through a windows batchfile,uninstallation through another batchfile,things will be more quick.
4, I use windows ,and I noticed some expert use windows.Need cygwin be installed?
Thanks for all help!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: imagemagick,Smart person's trick?

Post by fmw42 »

Sorry I am not a Windows user and know very little about Batch files or Windows IM. But from what I know this command is unix.

Code: Select all

convert duck.png \( duck_mask.gif -negate \) \
          -alpha off -compose CopyOpacity -composite \
          \( +clone -channel RGBA -blur 0x1 +channel -alpha off \) \
          +swap -compose Over -composite  duck_removal_blur.png
The Windows equivalent to my knowledge would be

Code: Select all

convert duck.png ( duck_mask.gif -negate ) ^
          -alpha off -compose CopyOpacity -composite ^
          ( +clone -channel RGBA -blur 0x1 +channel -alpha off ) ^
          +swap -compose Over -composite  duck_removal_blur.png

What the above is doing is as follows:

1st line -- input duck.png and duck_mask.gif and negate the latter
2nd line put the negated duck.mask image into the alpha channel of duck.png
3rd line make a clone of the previous result and blur and turn alpha channel off
4th line compose the first result image (from line 2) onto the second result image (from line 3)



You can read more about Windows differences and Bat files from http://www.imagemagick.org/Usage/windows/ written by Wolfgang Hugemann.

For more about morphology, see Anthony's notes at http://www.imagemagick.org/Usage/morphology/

The only reason for needing Cygwin (a unix environment for Windows) would be if you want to run Unix shell scripts without converting them to Windows Bat file scripts. Wolfgang's file above also talks about using Cygwin to run Unix shell scripts.
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: imagemagick,Smart person's trick?

Post by leescott »

fmw42 wrote:The only reason for needing Cygwin (a unix environment for Windows) would be if you want to run Unix shell scripts without converting them to Windows Bat file scripts. Wolfgang's file above also talks about using Cygwin to run Unix shell scripts.
Thanks for your help!
Post Reply