Imagemagick shell script

Cancelled Posted Nov 20, 2012 Paid on delivery
Cancelled Paid on delivery

I need a very simple shell script to help me convert a lot of images. You would need an understanding of loops in shell scripts and the knowledge of how to write ImageMagick commands.

I am running Mac OS X. Attached is a screenshot of the directory layout the shell script has to traverse. I want to cd into a folder like "Volume 1" so that it's my active directory, then run this script in that folder, and then the script must work like this:

for every directory inside our active directory {

rename the directory Web-Lossless to Lossless-800px

for every file in the directory Lossless-800px {

Use imagemagick to convert image [to fit width of 640px] & [to png format, 16 colours only, no transparency, no dithering, an adaptive palette] and save that image in the directory Web-640px

open -a [url removed, login to view] [[url removed, login to view]]

}

for every file in the directory 600dpi-Photoshopped {

remove all leading zeroes from the file name (e.g. [url removed, login to view] -> [url removed, login to view], [url removed, login to view] -> no change)

Use imagemagick to convert the file [to fit width of 1600px] & [to png-24 format, no transparency but full quality] and save that image in the directory HQ-1600px

Use imagemagick to convert image [to fit width of 1600px] & [to png format, 256 colours, no transparency, no dithering, an adaptive palette] and save that image in the directory Web-1600px

open -a [url removed, login to view] [Web-1600px/that output [url removed, login to view]]

}

}

A few notes of interest:

- You cannot count on the source images (either the ones in 600dpi-Photoshopped or the ones in Web-Lossless) being .psd or .png or .jpg. I assume ImageMagick will just take whatever you throw at it, though!

- When I say fit width, I mean that it should be resized proportionally down to fit inside the bounds of 1600px width and unlimited height. Of course, it should be bicubic, or whatever, the highest possible quality.

- When I say an adaptive palette, I just mean whatever looks best. I'm used to using Fireworks and Photoshop to manually (or batch) export these images, and, for example, Fireworks' "Adaptive" colour palette choice always turns out great. I definitely DON'T want to be limited to a predefined 16 or 256 color palette like Websafe or Windows or whatever.

- ImageOptim compresses the PNG further, and works like: "open -a [url removed, login to view] /directory/subdir/[url removed, login to view]"

- No need to run that on HQ-1600px because that is supposed to be a "source" quality image, no degradation of quality and no need for absolute lowest file size.

I think that's it! Hopefully someone can help me with this one.

Photo Editing Shell Script

Project ID: #2693368

About the project

3 proposals Remote project Active Nov 24, 2012

3 freelancers are bidding on average $64 for this job

triadb

Hi, please check PM

$111 USD in 0 days
(1 Review)
1.1
nylener

Good day, I am a professional graphic artist. I can do this very well. thank you

$30 USD in 1 day
(0 Reviews)
0.0
kjck04

Hello. I have years of experience in shell script and worked on various instances with image-magick, convert and other graphic programs. I have confidence that I can complete your task appropriately. Best regards.

$50 USD in 5 days
(0 Reviews)
0.0