Add padding while generating thumbnail

There are no built in functions to size-up an image. You might be able to accomplish what you are looking for by using wp_get_attachment_metadata and an Image processor like GD or Imagegick if your host supports it. Normally at least one of them is supported.

So wp_get_attachment_metadata returns an array on success or bool false on failure. So given (pseudocode):

$thumbnail = wp_get_attachment_metadata( $attachment_id );

if( $thumbnail['width'] < 100 || $thumbnail['height'] < 100 ){

  do_image_padding( $thumbnail, $width = 200, $height = 200 );

} 

Now of course do_image_padding doesn’t exist in WP, but it’s possible with GD library to create this function that would take in as parameters, the thumbnail, the width and the height and render the new image with padding.

This extensive explanation using GD by bumberbox over at stackoverflow should put you on the right track to built that do_image_padding function.