display photos keeping the aspect ratio

mdrsti

New Member
I want to display image in fixed size without changing the aspect ratio.I wanna display images in this size \[code\]200px * 200px\[/code\], while keeping the original aspect ratio.
All the images here are larger than \[code\]200px * 200px\[/code\].I want to crop the image from center and set width and height as 200px, without changing the aspect ratio, which means we only want to display some part of the image.Could anyone tell me how to realize it? I've tried CSS using max-width and max-height but seems CSS couldn't help.I use PHP as server-side language. I heard someone suggest GD. Any ideas?
 
Back
Top