![]() ![]() If you don’t like the command line try the small image optimization app ‘Trimage’, which provides a GUI front-end for jpegoptim (and pngcrush). So in this post we show you a command line tool that lets you quickly compress jpeg images on Linux, without any fuss. Well, you might reach for a GUI app, like GIMP, and play around with settings. All the pictures, including the different size variants, have rotated 90° clockwise.Let’s say you need to compress a JPEG image on Linux - how do you do it? $ convert -rotate degrees original original Rotating pictures in a loopĪfter a list of image files, which need to be rotated, is created, you can iterate over the list using a simple for /tmp/rotate $ for picture in 90-IMG_8367*.jpg 90-IMG_8379*.jpg do ls $picture convert -rotate 90 $picture $picture doneĪnd voilà. To overwrite the original with the new rotated picture, simply use the same file name: Important note is that you need to tell the convert command to use original and new file name of the picture or you might get an error like this:Ĭonvert-im6.q16: no images defined `orig.jpg' error/convert.c/ConvertImageCommand/3258. 90) rotate the picture clockwise (to the right if you have never seen a watch). To rotate a picture the syntax is the following: With the command you can change the size, quality and do many more image manipulations (even create an animated GIF from a series of images). The convert command supports a lot of features and parameters (see convert -help). The "tricky" part is to find the imagemagick command the command itself is actually called convert. On Debian and Ubuntu the installation is as easy as: It is already part of the default repositories of most Linux distributions. Imagemagick is an awesome graphic manipulation software which can be run on the command line. ![]() ![]() 1) The ones opening each wrong horizontal pictures in a graphic software (GIMP, Photoshop, etc), rotating the image, saving and uploading to the web server.Ģ) The ones trying to automate this task. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |