This is a small and simple project regarding PHP GD library.
What we basically need is for you to create a function for us that gets:
1. JPG Image URL
2. Desired Width
3. Desired Height
4. New image save path (where the resized image will be saved)
The function will then take the image and resize the picture (while preserving the ratio!).
This is important: If the original image proportions aren't the same as the desired width/height proportions then you have to:
1. Stretch the image so that it will reach the closest edge (while preserving the ratio!); see first 2 examples on the attached photo.
2. Centralize the image and put white background on the sides; see first 2 examples on the attached photo.
We've attached an example photo demo with few examples (please ignore the black outline the surrond the photos).