title: Resize image to fit perfectly a determined box
body: <p>I want to do the following :</p>
  
  <ul>
  <li>I need to resize images to fit and fill enterly 100x100 pixel box<br>
  not all image are perfect squares, and thats my problem for this task
  <ol>
  <li>I want to determine wich side (width or height) is the smallest.</li>
  <li>Bring that Side to 100px while scaling down; Center back</li>
  <li>Crop the overflow on both side</li>
  </ol></li>
  </ul>
  
  <p>I've tried the width/height :100% technic but that doesnt give the result i want, (it is streched and ugly). Also i've seen some method but in C# ... I need in PHP.</p>
  
  <p>I would appreciate any advice, directions, input, or ready script...
  Thanks</p>
  
  <p>using PHP 5.3.0</p>