2

Is there and easy way to resize images by right click on image and select resize option without opening any app, if possible all images in folder at once ?

I know that many will lead me to install 3rd party tool to do that. I am already using GIMP and I am very happy with that. I am just curios is there an easy way to do that.

melic
  • 371
  • 1
  • 4
  • 13

2 Answers2

3

There is for KDE. You can use a dolphin service menu, like e.g. this

There is also nautilus-image-converter that does the same in Nautilus (nowadays stupidly called files), but I have not tried it myself. It is in the repositories (at least in Ubuntu 17.04).

To quickly do this on the CLI

convert image.jpg -resize 50% out.jpg

For this to work, you will need to have imagemagick installed:

sudo apt-get install imagemagick
Bruni
  • 10,180
  • 7
  • 55
  • 97
  • now at least I have hope ; I will check the links you have given.My repu is not enough to upvote but I will when I have enough :D – melic May 23 '17 at 09:35
  • @melic nautilus-image-converter is still in the repositories. You should have a look. – Bruni May 23 '17 at 09:38
  • `>convert test.jpg -resize 50%` I got this error : `convert: missing an image filename `50%' @ error/convert.c/ConvertImageCommand/3207.` – melic May 23 '17 at 09:38
  • @melic you need to provide an output file name, see my update – Bruni May 23 '17 at 09:40
  • `convert -resize 50% test.jpg test2.jpg` worked for me thanks now I will try to make batch I hope it works – melic May 23 '17 at 09:43
  • thanks for your kind reply and answer ; now I will get deep in imagemagick to solve resize issues like fixed width or fixed height. I wish I could give up vote but I still need time for that :D – melic May 23 '17 at 09:53
  • btw I can not tag your name with @ symbol and name ... system deletes when I write @ Bruni – melic May 23 '17 at 09:54
3

Not quite an answer to what was asked, but to do all images in a folder at once from the command line.

for f in *.jpg; do convert $f -resize 700 $f; done

This assumes all your images are .jpg and will resize them to 700 pixels wide.

This will overwrite the original file (which is what the question implied was required) but if you want to keep the original, you have a couple of options.

for f in *.jpg; do convert $f -resize 700 ../resized/$f; done

This puts the resized photos into a directory called resized. (You need to create this first)

Or you could change the filename

for f in *.jpg; do convert $f -resize 700 $(basename $f .jpg)-resized.jpg ; done

This adds -resized to the filename of each, e.g. file0001.jpg will be resized and named file0001-resized.jpg

Carl H
  • 6,071
  • 5
  • 27
  • 41
  • Dear @Carl H and Bruni I think I got the answer I am looking here with your both answers. Thanks a lot . I wish I can pick 2 answer as a solution.Is there a way to follow a user here? – melic May 23 '17 at 12:51
  • with little improvement I could keep original files and make copies with modificaitons like this `for f in *.jpg; do convert $f -resize 700 s_$f; done` – melic May 23 '17 at 13:14
  • @melic I've added some extra details for keeping the original files. – Carl H May 23 '17 at 14:13
  • thanks for your kind update; now I can make 3 different size of all my images by just in seconds. – melic May 25 '17 at 08:14