CentOS and Linux Stuff Installing Programs in CentOS Cheatsheet - everything you need to know

CentOS and Linux Stuff Installing Programs in CentOS Cheatsheet

How to install jpegtran for Linux CentOS

Jpegtran is a very useful thing to have if you are working with jpeg images on CentOS. Installing it on CentOS is easy, just type the following command:

yum install libjpeg*

Once installed it should be in /usr/bin/jpegtran

View More Details (and 3 discussions about this topic) Here...

How to install and use jpegoptim on Linux CentOS

If you have a bunch of jpgs that you want to optimise, you will probably want to use jpegoptim. Here is how to install it on Linux CentOS

yum install jpegoptim

How to use jpegoptim on Linux CentOS

The syntax for using jpegoptim is simple - jpegoptim yourImage.jpg. Of course, there are some options you can pass to it.

How to use jpegoptim on Linux CentOS to optimise all images (recursively) in a directory

Use the following command to automatically recursively go through the current directory (and all subdirectories/folders) and optimise the jpg image, lowering its file size. You won't notice any difference in quality, but it will strip all useless information stored in the jpg's meta data

find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;

You should also see my page explaining how to do the same thing but for png images

View More Details (and 4 discussions about this topic) Here...

How to install and use optipng on Linux CentOS

If you have some png files that you want to optimise, you can use optipng to do it without losing any data in the image. Here are the commands you need to use to first install optipng, then recursively run it on all png images in a directory

First you must install optipng on your server, with this command:

yum install optipng

Then run it on all png images within the current directory (and all subdirectories)

find . -name "*.png" -exec optipng -o7 {} \;

You should also see my page explaining how to do the same thing but for jpg images

View More Details (and 7 discussions about this topic) Here...