[Hidden-tech] auto conversion of photo files to smaller size

Robert Heller heller at deepsoft.com
Fri Mar 6 21:06:22 EST 2015


At Fri, 06 Mar 2015 14:18:23 -0500 Stacy Kontrabecki <swampdancer at comcast.net> wrote:

> 
> 
> 
> 
> Short of importing photos I took on my better camera into Photoshop 1 by 
> 1 and reducing the file size (so I can include the photos in a report 
> document (Word, PDF) without making the report file huge), is there an 
> automatic way I can select all the photo files and resize them?


Well, under Linux, I use a program called convert (part of the ImageMagicK
package), a command line utility commonly installed on Linux system (and very
likely available for MacOSX as well), in a simple looping shell script. It is
*possible* that the ImageMagicK package has been ported to MS-Windows, in
which case it would then be possible to create a BAT file to do this as well.

#!/bin/bash
mkdir qsize
for x in *.jpg; do
  convert $x -geometry 50%x50% qsize/$x
done

The above (BASH) script will convert every JPG file to 1/4 (1/2 as high by 1/2
as wide) of its original size and store the result in the subdirectory named
qsize.

> 
> I should have a better idea of how to manage this, but I don't.
> 
> Thanks.
> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                   


Google

More information about the Hidden-discuss mailing list