Results 1 to 4 of 4

Thread: Resizing jpeg images in folders

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Resizing jpeg images in folders

    Hello everyone,

    I need help.

    I have always used this command "mogrify -resize 650x920 *.jpg" to do mass re-size of pictures in a folder. But this time the pictures are in individual folders but in the same parent folder. How can run this command. I am using Ubuntu 12.04.

    Thank you for your help.

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    454
    Thanks
    0
    Thanked 62 Times in 58 Posts
    Rep Power
    10

    Default

    hi,

    not tested

    you're using sh? do a for loop :
    Code:
    for d in parentDir/*/; do mogrify "$d"/*.jpg; done
    you're using bash?
    Code:
    shopt -s globstar
    mogrify parentDir/**/*.jpg
    find could be used too
    Code:
    find parentDir -type f -iname "*.jpg" -exec mogrify {} \+
    A problem clearly stated is a problem half solved.

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default SOLVED:Resizing jpeg images in folders

    Thank you for your reply.

    I have used "find NoticePod -type f -iname "*.jpg" -exec mogrify -resize 650x524 {} \+" and it worked like charm.

    Thank you.

    Quote Originally Posted by Watael View Post
    hi,

    not tested

    you're using sh? do a for loop :
    Code:
    for d in parentDir/*/; do mogrify "$d"/*.jpg; done
    you're using bash?
    Code:
    shopt -s globstar
    mogrify parentDir/**/*.jpg
    find could be used too
    Code:
    find parentDir -type f -iname "*.jpg" -exec mogrify {} \+
    Last edited by hotoracle; 22nd January 2013 at 07:01 PM. Reason: Solved

  4. #4
    Senior Member
    Join Date
    Aug 2011
    Posts
    454
    Thanks
    0
    Thanked 62 Times in 58 Posts
    Rep Power
    10

    Default

    the whole mogrify command doesn't change, I simply wrote the name of the command.
    A problem clearly stated is a problem half solved.

  5. The Following User Says Thank You to Watael For This Useful Post:

    hotoracle (22nd January 2013)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to burn mdf images in Windows?
    By sweta in forum Windows Xp/2000/2003 server administration
    Replies: 1
    Last Post: 5th February 2010, 10:00 AM
  2. [Solved] nginx Block Images in wp-uploads
    By vamsi in forum Web servers
    Replies: 7
    Last Post: 4th December 2009, 07:03 PM
  3. Resizing a UFS Partition on FreeBSD 7
    By kevv.mai in forum All about FreeBSD/OpenBSD/NetBSD
    Replies: 2
    Last Post: 25th June 2009, 10:00 PM
  4. zipping folders within folders
    By amanuensis in forum Shell scripting
    Replies: 3
    Last Post: 31st December 2008, 04:08 PM
  5. Linux Automatically mount NFS and ISO Images on Boot
    By san in forum CentOS / RHEL / Fedora
    Replies: 1
    Last Post: 28th December 2008, 08:01 PM

Tags for this Thread

Posting Permissions

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