How To Properly Generate and Update Metadata Image Information In Wordpress
Use the wp_generate_attachment_metadata function.
This function generates metadata for an image attachment. It also creates a thumbnail and other intermediate sizes of the image attachment based on the sizes defined on the Settings_Media_Screen.
http://codex.wordpress.org/Function_Reference/wp_generate_attachment_metadata