I'm making a site and I need all the users to have a square profile picture. Could anyone point me to a site that explains the process of cropping an image/resizing image with php?
Asked
Active
Viewed 2,551 times
0
-
Duplicate: http://stackoverflow.com/questions/1855996/crop-image-in-php – Jacob Mar 22 '11 at 00:10
2 Answers
1
Have a look at my simple image manipulation class - https://gist.github.com/880506
It provides basic cropping, resampling and canvas resizing.
You can use it as-is or treat it as a learning source.

Phil
- 157,677
- 23
- 242
- 245
0
first you can get that image width and height with getimagesize()
and create an imagestring with file_get_contents()
and create a source for your profile image with width and height that you need
and create $tmp with imagecreatetrueclor()
at the latest you create an image for profile whit imagejpg()
the next step you should empty the memory with imagedestroy()

archland
- 1