There are several ways of doing it. The most common being using gd although the gd library is a tiny library that handles very few file formats. I would recommend using the imagick library and this can be viewed on the php documentation .
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259