Added a function to save a thumbnail from Bitmap.