Automated shrinking of 300 photos in Linux?


Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Automated shrinking of 300 photos in Linux?

  1. #1
    Join Date
    Dec 1999
    Location
    tx
    Posts
    1,190

    Automated shrinking of 300 photos in Linux?

    My son-in-law is a part-time professional photographer. He has 300 photos he needs to shrink, he didn't say how much, but he tried on the usual Windows Photo programs, the ones that cost a fortune, and none will allow any sort of automated shrinking for 300 photos. He says it is simply not do-able to shrink one at a time.

    He took them to the studio of a friend who is a pro, and he also couldn't do a mass shrinking.

    I am aware of GIMP, though not an expert at all.

    Does anyone know of any way a person could use, for example, a live CD, and somehow shrink an entire folder of 300 photos? It would not require any other changes, and it must be assumed quality and colors should not change. I think they could be put on a Cd and moved to another computer.

    I realize this is a far shot, but it would be a strike for our side...

    Thanks for any tips.

    I have done a bit with BASH script files, but have no idea any mechanism for accomplishing such a task.

  2. #2
    Join Date
    Jan 2004
    Location
    Los Angeles CA
    Posts
    185
    What file format?
    Did you look at transcode, image Magic or NetPBM?
    Also I know Gallery would do it for my photo website when I had it up so it is possible.

    http://gallery.menalto.com/

    might ask on their web forum also ie photo:geeks might have the answer

    http://www.imagemagick.org/script/index.php


    http://netpbm.sourceforge.net/
    Last edited by nikodell; 05-12-2007 at 04:01 PM.

  3. #3
    Join Date
    Jan 2004
    Location
    boston, mass USA
    Posts
    1,878
    imagemagick is the way to go...something like:

    for i in `ls /pictures`; do convert -5% $i; done

    or whatever the convert options are for shrinking

  4. #4
    Join Date
    Jan 2004
    Location
    Los Angeles CA
    Posts
    185
    Look here this will help your bash script with Image Magic which I think should work.
    http://www.imagemagick.org/script/convert.php

  5. #5
    Join Date
    Oct 2001
    Location
    North Dakota, USA
    Posts
    46
    As nikodell posted, what file format?
    Imagemagic does do conversion and sounds like the Linux tool to use...I'm not very familiar with it though.

    I can recommend a Windows option though...and freeware to boot.
    Irfanview will do batch conversions, and has many conversion options too choose from. Under the batch conversion menu, select the Advanced Options checkbox and set the size (percentage or pixels) and your source/destinatnion directories. www.irfanview.com
    Last edited by Moparmike; 05-12-2007 at 05:23 PM.

  6. #6
    Join Date
    Dec 1999
    Location
    tx
    Posts
    1,190

    Oops, sorry: jpg format

    Quote Originally Posted by nikodell
    What file format?
    Did you look at transcode, image Magic or NetPBM?
    Also I know Gallery would do it for my photo website when I had it up so it is possible.

    http://gallery.menalto.com/

    might ask on their web forum also ie photo:geeks might have the answer

    http://www.imagemagick.org/script/index.php


    http://netpbm.sourceforge.net/
    That wasn't really smart not to post the format. He said .jpg. I did look at Gallery, and it requires to be used on a server.

    I will be looking at other proposals tomorrow, seeing if I can make any of them work. it will take time. Thanks to all for suggestions.

  7. #7
    Join Date
    Oct 2005
    Location
    Nuernberg, Germany
    Posts
    183
    imagemagick with a simple bash script is the way to go, and fast at that

  8. #8
    Join Date
    Feb 2005
    Location
    California
    Posts
    158
    http://picasa.google.com/

    Works with Windows and Linux and can do just that. If he is using a mac (being a photographer I'm assuming he might) he could use iPhoto and/or an automator script to do it. Its pretty easy to accomplish no matter the platform.

    -DarkDexter
    "If you think your users are idiots, only idiots will use it." -Linus Torvalds

  9. #9
    Join Date
    Feb 2003
    Location
    New Zealand
    Posts
    23
    It is not necessay to write a script this command will resize all the files in the current directory
    mogrify -resize 50% *.JPG

  10. #10
    Join Date
    Apr 2003
    Location
    Oklahoma
    Posts
    559
    I hadn't used mogrify before (just convert), and when I checked it out, its man page stated that it is similar to convert, but overwrites the original file.

    Something one should know before using it, me thinks....

  11. #11
    Join Date
    Dec 1999
    Location
    tx
    Posts
    1,190

    Both OS

    He has a PC, but his buddy, a professional photographer, has a Mac and they both tried it, he claims when he first got the program it worked.

    I am afraid my lack of knowledge will cause me to lose these points for Linux, since that other program, infrview (?) will apparently do the job.

    I did note that what he told me he did with PS does not seem to agree with the instructions. The instructions say to build an ACTION, which includes the commands you want and a name for the ACTION, then go to BATCH, and specify that ACTION.

    What he told me he did was go to BATCH, then specify the command IMAGE SIZE. And, the error message had to do with IMAGE SIZE not being available.

    So, at this time, I suspect it is an operator error.

    It will take time for me to investigate all your wonderful suggestions, and I am guessing he will use another solution. However, in my experience, learning like this will have future use, and I appreciate it.

    Also, most of my problems in the past have been solved via Google, and many of those answers have been previous postings with answers by others. Thus, you can be sure there will be others with the same problem who come here and find the answer to their problems. It is not visible to you helpful people, because most do not bother to register to give thanks, but that has been my experience.

  12. #12
    Join Date
    Oct 2004
    Location
    suomi
    Posts
    364
    i usually use imagemagick's convert tool:
    convert *.jpg -size 1024x768 resized.jpg
    that would convert all jpg files in directory to 1024x768 and it would name them
    resized-0.jpg resized-1.jpg and so on.
    ladoga

  13. #13
    Join Date
    Jan 2004
    Location
    boston, mass USA
    Posts
    1,878
    isn't linux the coolest?

    Windows people (like myself) always look or assume the hardest solution. "Go buy photoshop or download infraview and this that and the other...."

    Linux people (like myself ) can just do stuff ..... "convert *.jpg -size 1024x768 resized.jpg"....how much simpler could it be?

    So yes, linux is the coolest.

  14. #14
    Join Date
    May 2007
    Posts
    59
    shouldn't it be "convert *.jpg -size 1024x768 *resized.jpg" so that they arent all put onto resized.jpg?
    or is there an automatic handler for duplicate files?
    - Ryan "Boxxertrumps" Trumpa

  15. #15
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Quote Originally Posted by boxxertrumps
    shouldn't it be "convert *.jpg -size 1024x768 *resized.jpg" so that they arent all put onto resized.jpg?
    No. If you do that, then the shell will interpret the * before the "resized", and attempt to expand it into all the filenames that match that pattern. (That's what happens with *.jpg, too: the shell does the expansion, not convert. convert gets each filename passed to it as a separate argument.)

    Now in this case, there probably aren't any filenames that match that pattern, so convert will get "*resized.jpg" as a parameter -- and it will promptly create a file (actually probably a set of files) with an asterisk in their names. And those files will be really hard to manage in a shell...

    In any case, convert is smart enough to avoid creating multiple output files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •