Given a full path of an image file, how to get its thumbnail?

view story

http://stackoverflow.com – It seems the answers I searched online (including stackoverflow.com) get the image file id through gallery selection. I have created my own file explorer. Then how to do that? I can create my own small size image; but I think it would be faster if we can make use of an exisiting thumbnail; and if it does not exist, I would prefer to create a thumbnail that is saved for later use. (HowTos)