Is there any way to alter the "field type" of a field? I need to change the field type "file" to "image" in drupal 7. I just hack the database and found a table named "field_config" and modified the "type" and "module" column, from "file" to "image". I found that it's works correctly.

My question is that, is this the correct way to change the "field type" of the field? Any better answer would be appreciated. Thanks in advance.
Drupal itself does not support changing the field type, only the widget. This is because different types have different database structure. On the other hand, it is possible to change some types with custom code (e.g. see http://www.up2technology.com/blog/converting-drupal-fields) but in general, you would need to write migration to do this. 

So in general, it is not possible to change the field type without loosing the data stored in it, especially not things like text -> image etc.