Greetings
I'm coding a MOTIVATIONAL POSTER generator. It's all working ok, but this part.
I want the user to be able to upload any imagem and make it fit the 600x400 screen.
For exemple: if he uploads a image of 1000x500, the script would resize it to 800x400 (the smaller side) and crop 200px from the 800.
Same if the image is smaller then 600x400.
Let's say an 400x300 image. It would resize it to 600x450 then crop 50px from the 450.
The question is how to do it. I can't figure how =/
Resizing and croping with GD
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Resizing and croping with GD
imagecopy to crop, then imagecopyresized to resize cropped image...