in the galleries folder, there is a subfolder for each gallery. In that subfolder, there is an index.php file.
in that file, it sets the thumb and large image sizes by a line that looks like:
$gallery = get_gallery(get_mediarss_url('gallery=' . $pg_id . '&thumb=62c&full=782p'));
in this case the thumbnail is using the 62w x 62h cropped image, and the 782w x 481h proportional image.
the JavaScript will automatically set the image frame to use the 782w x 481h dimensions.
Yes, the images will be resized by on upload automatically and re sampled, regardless of whether the original image size matches what is used.