RSS/Atom feed Twitter
Site is read-only, email is disabled

Scaling image via the command line

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

9 of 9 messages available
Toggle history

Please log in to manage your subscriptions.

Scaling image via the command line Sanjay Murthy 24 Jan 19:43
  Scaling image via the command line Claus Cyrny 24 Jan 21:10
  Scaling image via the command line David Hodson 25 Jan 02:05
   Scaling image via the command line Mark J. Reed 25 Jan 02:39
   Scaling image via the command line Tobias Jakobs 25 Jan 10:42
    Scaling image via the command line DJ 26 Jan 01:06
     Scaling image via the command line Owen 26 Jan 01:49
  Scaling image via the command line Owen 25 Jan 04:22
  Scaling image via the command line smw 25 Jan 19:10
Sanjay Murthy
2009-01-24 19:43:18 UTC (almost 16 years ago)

Scaling image via the command line

Hi,

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical. I have GIMP on Linux and Windows. I am reasonable linux literate . I work on it for a living.

Thanks

Sanjay

EMAILING FOR THE GREATER GOOD Join me

Claus Cyrny
2009-01-24 21:10:56 UTC (almost 16 years ago)

Scaling image via the command line

Sanjay Murthy wrote:

Hi,

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical. I have GIMP on Linux and Windows. I am reasonable linux literate . I work on it for a living.

For this, I can recommend ImageMagick (http://www.imagemagick.org/). The 'convert' command can do this, and by using a script you can batch-process files. ImageMagick has an amazing number of options where you can specify the output file format, the compression ratio, compression algorithms, resolution, and much more.

Claus

David Hodson
2009-01-25 02:05:17 UTC (almost 16 years ago)

Scaling image via the command line

On Sat, 2009-01-24 at 11:43 -0700, Sanjay Murthy wrote:

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical.

No it isn't. Get David's Batch Processor plugin for GIMP at

http://members.ozemail.com.au/~hodsond/dbp.html

-- David

Mark J. Reed
2009-01-25 02:39:04 UTC (almost 16 years ago)

Scaling image via the command line

I would use ImageMagick for this instead of the GIMP.

$ convert -resize 600x800 source-image dest-image

or

$ mogrify -resize 600x800 image-to-change-in-place

That's width x height, btw, which would usually be 800x600 instead of 600x800...

On Sat, Jan 24, 2009 at 8:05 PM, David Hodson wrote:

On Sat, 2009-01-24 at 11:43 -0700, Sanjay Murthy wrote:

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical.

No it isn't. Get David's Batch Processor plugin for GIMP at

http://members.ozemail.com.au/~hodsond/dbp.html

-- David

_______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Owen
2009-01-25 04:22:31 UTC (almost 16 years ago)

Scaling image via the command line

r-Encoding: quoted-printable

Hi,

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical. I have GIMP on Linux and Windows. I am reasonable linux literate . I work on it for a living.

Thanks

Sanjay

Maybe something like this,

http://linux.softpedia.com/get/Multimedia/Graphics/BIRT-37784.shtml

Another tool is Imagickmagic

Owen

Tobias Jakobs
2009-01-25 10:42:11 UTC (almost 16 years ago)

Scaling image via the command line

Am Sonntag, den 25.01.2009, 12:05 +1100 schrieb David Hodson:

On Sat, 2009-01-24 at 11:43 -0700, Sanjay Murthy wrote:

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical.

No it isn't. Get David's Batch Processor plugin for GIMP at

http://members.ozemail.com.au/~hodsond/dbp.html

Or have a look at Phatch:

http://photobatch.stani.be/

Regards, Tobias

2009-01-25 19:10:54 UTC (almost 16 years ago)
postings
2

Scaling image via the command line

Hi,

I wish to scale the 6MP images from my camera to a smaller size say 600x800

to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical. I have GIMP on Linux and Windows. I am reasonable linux literate . I work on it for a living.

Thanks

Sanjay
EMAILING FOR THE GREATER GOOD
Join me

If you have Python installed, I just uploaded a plug-in to registry.gimp.org for batch creating thumbnails from within GIMP. Name: WebThumb

DJ
2009-01-26 01:06:05 UTC (almost 16 years ago)

Scaling image via the command line

Hi Tobias, gimp-users,

I wish to scale the 6MP images from my camera to a smaller size say 600x800 to be loaded into my phone. How can this be done via command line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical.

A possible solution: ImageMagick - Checkout convert, display, identify http://www.imagemagick.org/script/convert.php http://www.imagemagick.org/script/command-line-processing.php#geometry

Here's a *sample* Bash script. Perhaps something like this will work in your situation. Read up on the options for resizing (see links above).

Hope this helps.

# # Resize images in current directory using ImageMagick convert command declare -r ImageExt="jpg"
declare -r Tag="600x800"
declare -r NewSubDir="resized-${Tag}" declare -r IMResizeOpt="600x800!"

# Create directories if not already present if [ ! -d "${NewSubDir}" ]; then
printf "Make subdirectory %s\n" "${NewSubDir}" mkdir "${NewSubDir}"
fi

# Loop through all files in current folder for theCurrentFile in *".${ImageExt}"; do theNewFile="${NewSubDir}/${theCurrentFile%%.${ImageExt}}-${Tag}.${ImageExt}" if [ ! -e "$theNewFile" ]; then
printf "Converting '%s' to '%s'\n" "${theCurrentFile}" "${theNewFile}" convert -resize "${IMResizeOpt}" "${theCurrentFile}" "${theNewFile}" fi
done

Owen
2009-01-26 01:49:04 UTC (almost 16 years ago)

Scaling image via the command line

Hi Tobias, gimp-users,

I wish to scale the 6MP images from my camera to a smaller size

say

600x800 to be loaded into my phone. How can this be done via

command

line ? What are the switches (and arguments) to be used ? I have hundreds of images to be scaled. doing this with the GUI is impractical.

A possible solution: ImageMagick - Checkout convert, display, identify http://www.imagemagick.org/script/convert.php http://www.imagemagick.org/script/command-line-processing.php#geometry

Here's a *sample* Bash script. Perhaps something like this will work in
your situation. Read up on the options for resizing (see links above).

Hope this helps.

# # Resize images in current directory using ImageMagick convert command declare -r ImageExt="jpg"
declare -r Tag="600x800"
declare -r NewSubDir="resized-${Tag}" declare -r IMResizeOpt="600x800!"

# Create directories if not already present if [ ! -d "${NewSubDir}" ]; then
printf "Make subdirectory %s\n" "${NewSubDir}" mkdir "${NewSubDir}"
fi

# Loop through all files in current folder for theCurrentFile in *".${ImageExt}"; do theNewFile="${NewSubDir}/${theCurrentFile%%.${ImageExt}}-${Tag}.${ImageExt}" if [ ! -e "$theNewFile" ]; then
printf "Converting '%s' to '%s'\n" "${theCurrentFile}" "${theNewFile}"
convert -resize "${IMResizeOpt}" "${theCurrentFile}" "${theNewFile}"
fi
done

Maybe a modification of this;

================================================== #!/bin/bash

for img in *.jpg
do
convert -sample 25%x25% $img thumb-$img done
==================================================