Page 1 of 1

simple task for newbie - need some help

Posted: 2012-10-11T12:03:25-07:00
by quintosol
I need to make a simple bat file to automatically apply to all JPG images when they're placed into a folder. This will run on a Windows 2003 Std Server (for now). I'll I need to do is resize the images to 245x306 pixels, move them to a new folder, and delete the original files. Not sure if I need to run CONVERT or MOGRIFY command. Anyone available to help out? I'd like to have it run automatically in the background on the server, but if it takes another app to apply the batch file - I'm fine w/that.

Originating folder location:
D:\5SunJPEGs\5Sun Sales\AX_Image_Input
D:\5SunJPEGs\5Sun Sales\AX_Record_Images

Final file resolution in pixels 245x306

I might want to change the format to PNG, as it may help w/compression artifacts, but may not be needed since the image will be for a database reference image only.

Thanks in advance!

I'll even throw in a couple of free t-shirts if someone can help me out (any Star Wars or Angry Birds fans out there?).

Re: simple task for newbie - need some help

Posted: 2012-10-11T12:59:09-07:00
by Bonzo
I need to make a simple bat file to automatically apply to all JPG images when they're placed into a folder.
I think this is the hard part as you need a program/batch file to watch the folder for changes.

Why cant you add the resize code to the image upload code.

Re: simple task for newbie - need some help

Posted: 2012-10-11T13:52:06-07:00
by quintosol
The images will be dropped into a folder that has to run unattended and resize and move to another folder. Not complicated - I just can't seem to get the bat file to function anymore. The image file names have spaces in them, and it keeps seeing each word in the file name as a separate file. I can do what I need to do w/photoshop action/droplet, but I prefer to have IM do this simple task.

Not sure what you mean by adding resize code to upload code.

Re: simple task for newbie - need some help

Posted: 2012-10-11T14:09:00-07:00
by Bonzo
As you are using "drag and drop" you do not have any upload code so that option is out.

The method in windows of dealing with filenames with spaces is to enclose the filename/path in " " but that never seemed to work very well for me. I still had errors and I do not know if it was a Windows or IM problem. If it is a IM on Windows problem you could replace the space with a _ before passing the filename to the IM comand.

Re: simple task for newbie - need some help

Posted: 2012-10-11T17:32:13-07:00
by anthony
If you can get a list of 'new files' then you can just give that list as arguments to a montage to generate your 'thumbnails', in another directory.

See... General Thumbnail Creation, and the montage example. Adjust to suit.
http://www.imagemagick.org/Usage/thumbnails/#creation

You maay want to replace (or add to) the -format option with a -path option.
See Morgify Command Example...
http://www.imagemagick.org/Usage/basics/#mogrify