> 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
==================================================

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

Reply via email to