File reference load and save

Hi,
I have loaded a image using file reference from my local. Now i need to save the same image as jpg using file reference file.save().

the problem here is after loading the image. I convert that images to bitmap. after converting to bitmap the bitmap image is black.(no photo in it). So the jpg image is also black.

Any help would be great!.