0

I have a folder whose contents include ~300 images. I want to resize them to 800px wide in another folder. How can I do that? I have tried some ImageMagick command.

Zanna
  • 70,465
pcroland
  • 5
  • 3

1 Answers1

1

For GUI, Phatch "one click is worth thousand photos" is the best for such quick job. It is already in Ubuntu repository.

sudo apt-get install phatch

Otherwise for advanced users, as an example to loop through files in shell:

#!/bin/bash

# Configuration
ext="bmp"
count=0
total=0

#loop through all files in the current folder that ends with $ext extension
for i in $(ls *.$ext)
    do
        total=$(($total + 1))

            #replace the 'potrace -s "$i"' with your converting cmd
            #"$i" is the file name
            #it will count +1 if successful
        potrace -s "$i" && count=$(($count + 1))
    done

echo "$count/$total files converted"
#wait
read

This example converts bmp to svg, I wrote it previously for my brother to convert his scanned comic/anime drawings into vectorial form. Before coloring.

Aditya
  • 13,416
user.dz
  • 48,105