If your linux distribution have already updated the libraries to the latest version, it is very probably that all the dependable programs have been updated too.
In the case that a program (or a group of programs) needs the previous version to run properly dont sweat about it. You can easily install the previous libraries versions to an alternative path and use soft links.
Just follow the below instructions:
wget -c http://www.ijg.org/files/jpegsrc.v7.tar.gz tar zxvf jpegsrc.v7.tar.gz cd jpeg-7/ ./configure make # Now, you really have to became root, for the follow couple commands make install sudo ln -s /usr/local/lib/libjpeg.so.7 /usr/lib/libjpeg.so.7
wget -c ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.42.tar.gz tar zxvf libpng-1.2.42.tar.gz cd libpng-1.2.42/ ./configure make # Now, you really have to became root, for the follow couple commands make install sudo ln -s /usr/local/lib/libpng12.so /usr/lib/libpng12.so
And thats it!