Crop, Floodfill, Fuzz, Duplicate, Flip, Resize & Contrast!

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
mikemeadeuk
Posts: 7
Joined: 2011-06-22T15:59:43-07:00
Authentication code: 8675308

Crop, Floodfill, Fuzz, Duplicate, Flip, Resize & Contrast!

Post by mikemeadeuk »

Hi Guys,

Back again for some help with IM! Wondered if anyone can help?

I want to take an image, Floodfill the background to be transparent with a fuzz, duplicate that image, flip it and reduce the size by a % and insert behind the main image either at the top left or top right. I then want to apply some sort of vibrance to the whole image, I know photoshop has a vibrance option but cant see one with IM, will -brightness-contract or -level produce the same result? Oh, and also crop the whole image to remove a % of the bottom.

After all of this, I want to apply this to ALL images within a directory, I know how to do this with *nix but wanted to perform this task on a windows system as I dont want to increase the load on a production server.

Any help would be greatly appreciated!

I have attached the INPUT and what the OUTPUT should look like.

INPUT: Image OUTPUT:Image

Thanks in advance,

Mike
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Crop, Floodfill, Fuzz, Duplicate, Flip, Resize & Contras

Post by fmw42 »

Vibrance is more of an increased saturation that is controlled by a mask. See my bash unix script, vibrance, at http://www.fmwconcepts.com/imagemagick/ ... /index.php. At the bottom is some brief code from the script. You can see what I am doing with -modulate to increase saturation and then use a mask from the combined saturation and lightness channels to make the saturation effect only certain areas.

The rest of your command is fairly straight forward and probably can be done in one long command line using parenthesis processing and clones. Thus it can be translated to windows fairly easily. see http://www.imagemagick.org/Usage/windows/ Thus you just need put that long command line into a windows bat file so that it can be applied to many images.

see
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/basics/#seq_combine

Sorry I don't really know windows so cannot help further with that.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Crop, Floodfill, Fuzz, Duplicate, Flip, Resize & Contras

Post by fmw42 »

Sorry, I only know bash unix shell scripting. For windows, see http://www.imagemagick.org/Usage/windows/

You will likely have to write a bat file script to loop over each image in the directory and apply all the needed operations using convert. mogrify has limited functionality and does not allow more than one image in the command sequence (except in some special cases).
Post Reply