title: PHP crop image to fix width and height without losing dimension ratio
body: <p>im looking to create thumbnails that has 100px by 100px dimension. i've seen many articles explaining the methods but most end up having the width!=height if the dimension ratio is to be kept.</p>
  
  <p>for example, i have a 450px by 350px image. i would like to crop to 100px by 100px. if i were to keep the ratio, i would end up having 100px by 77px. this makes it ugly when im listing these images in a row and column. however, a image without dimension ratio will look terrible as well.</p>
  
  <p>i've seen images from flickr and they look fantastic. for example:<br>
  thumbnail: <a href="http://farm1.static.flickr.com/23/32608803_29470dfeeb_s.jpg" rel="noreferrer">http://farm1.static.flickr.com/23/32608803_29470dfeeb_s.jpg</a><br>
  medium size: <a href="http://farm1.static.flickr.com/23/32608803_29470dfeeb.jpg" rel="noreferrer">http://farm1.static.flickr.com/23/32608803_29470dfeeb.jpg</a><br>
  large size: <a href="http://farm1.static.flickr.com/23/32608803_29470dfeeb_b.jpg" rel="noreferrer">http://farm1.static.flickr.com/23/32608803_29470dfeeb_b.jpg</a></p>
  
  <p>tks</p>