Only Display Thumbnail if Larger Than

You may be able to make this work with a filter on post_thumbnail_html.

function filter_thumb_html($html, $post_id, $post_thumbnail_id, $size, $attr ) {
  $dimensions = wp_get_attachment_image_src($post_thumbnail_id, $size);
  if ($dimensions[1] > 500 || $dimensions[2] > 500) {
    return '';
  }
}
add_filter('post_thumbnail_html','filter_thumb_html',1,5);

I am not sure what you mean by “if it is larger/smaller…”. I don’t know if need both conditions at once, or one or the other, or if you need to change the restrictions dynamically. The code above should give you a working model though.

Reference

http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/post-thumbnail-template.php#L85