In Drupal, the Imagefield fieldtype comes with a built-in thumbnail generator. If you'd like to control the size of the thumbnail, just set the value of the imagefield_thumb_size variable, like so:
variable_set('imagefield_thumb_size', '200x200');
That'll set the imagefield thumbnail size to 200 x 200 pixels.