
January 10th, 2008, 10:01 AM
|
|
Developer Shed
|
|
Join Date: Jun 2007
Posts: 12,338
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
PHP GD Library: Cropping Images whilst Maintaining the Aspect Ratio
An article demonstrating how to crop an image using PHP's GD library, whilst still keeping the aspect ratio as it was originally. This is very clever as it prevents the image from looking stretch. For example, if you resized an image to 80x80 but the original image was wide-screen, then the image would look very much stretched. This article shows you how to get around that and crop images the proper way!
Read the full article here: PHP GD Library: Cropping Images whilst Maintaining the Aspect Ratio
|