Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a tool than runs on Ubuntu that can let me:

  • Open an image in a folder which has thousands
  • Crop and rotate it
  • Save as a copy, automatically named (not manually), with one click. Preferably with something in the name that I can later use to filter these cropped copies in Nautilus (unless it saves in another directory, that'd be even better).
  • Move to next image and repeat

Does it exist?

share|improve this question
Is the crop always to the same size (or same ratio of the initial image), or does the user need to tell the tool how to crop each image? Is the area to keep always the centre of the image or does it vary from image to image? Is the rotation always in the same direction by the same amount? – Blair Nov 29 '11 at 20:52
@Blair No, the images are "raw" photos that I need to crop and rotate manually and differently for every image. – Bart van Heukelom Nov 29 '11 at 21:01

What you need is ImageMagick which comes pre-instaled with Ubuntu! :)

convert -rotate 90 *.jpg

Read the on the website on how to crop (using the -crop parameter), which will vary depending on how much you want to crop and where to crop.

share|improve this answer
I don't think that'll be very comfortable. I need to see the images first, otherwise I wouldn't know how to rotate and crop. All in all it's not very speedy. – Bart van Heukelom Nov 30 '11 at 9:57

Have you tried digikam? That's really it but I have to have thirty characters to post. So, try digikam. It's in the USC.

share|improve this answer
+1 for digikam, if you do not need all the features it has you can also try showFoto for image editing. – Mark Rooney Mar 2 '12 at 9:14

Probably this doesn't address all your steps, and does not launch any GUI interaction at all, but I find the need to auto-crop a lot in the course of my nightly batch processing, after many screenshots and browser or application snapshots were generated.

Here's my use of convert(from the ImageMagick bundle already mentioned):

# find all PNGs in imgdir/ younger than a day
for f in $(find imgdir/ -mtime -1 -name \*.png); do  

# trim off edges of unchanging color and reduce to 6-bit color depth
convert -trim +repage -colors 64 -depth 6 -verbose $f $f.trimmed.png;   

# shrink the PNG file size with aggressive optimize
optipng -keep -preserve -o6 -v   $f.trimmed.png

ls -lFa $f*
share|improve this answer

You can invoke the image magick tools with find and okdir, previously invoking "disply" to have a look at it:

find -name "*.jpg" -exec display {} ";" -okdir convert -rotate 90 {} {}.rotated.jpg ";" 

It renames the result from kitten.jpg to kitten.jpg.rotated.jpg. If you want to remove the inner '.jpg', it would be more easy later in one go with the rename tool (from the perl package):

rename 's/.jpg.rotate/.rotate/' *.jpg.rotate.jpg 

For rotating, I would use eog (Eye of Gnome) where you have different views on the images, and can easily rotate left/right/180°, and save. But afaik, it doesn't has cropping.

Image Magick has a GUI interface too, but I don't remember its name, and can't say if it is useful for cropping, if you have different dimensions per image to crop to.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.