Fast fission’s suggestion worked for me too.
If you are just looking to hard code a max height/width for your thumbs, you can edit the portion that is meant to be commented out.
if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) {
if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 )
$thumb = wp_create_thumbnail($file, 128);
elseif ( $imagedata['height'] > 96 )
$thumb = wp_create_thumbnail($file, 96);
Replacing the 128 (max width) or 96 (max height) with your personal preferences.
Saves the extra fiddling if you want standard sizes across your site. ??
Great support forums BTW