First off, please search before you ask a question, you'll probably find a close answer, if not exact. Check out http://www.phpbuilder.com/board/showthread.php?s=&threadid=10231582 .
In order to do it if something is over a certain size, set up a conditional statement using imagesx() and imagesy() after loading the image:
$im = imagecreatefromjpeg("test.jpg");
$width = imagesx($im);
$height = imagesy($im);
if ($height >= 200 OR $width >= 200) {
// resize stuff in here
}
imagedestroy($im);