GD library (http://php.net/manual/en/book.image.php) is a good PHP library for manipulating images. I was familiar with it but never used in production before. I’m working on a personal project now which required some image manipulation for profile image (avatar). So, I used GD library and it’s really easy to use.
If you are using latest version of XAMPP, GD library is already included and activated. You don’t need to set up anything. Just start coding. Though php.net has the manual how to install GD library. If you are interested, you can see that. The manual contains almost everything you need to complete your task. You can resize, create, copy, crop and many more manipulation. I enjoyed using this. I hope it will help you too.
If you want you can use imagick (aka: ImageMagick). This extesnion has some advanced options. But many online server does not support imagick. But this extension is awesome too and will full-fill almsot everything you need to tweak you images.