Buddy as per i understand your problem you are trying to copy content of image file to a normal file it is ok to do it...:)
But if you are trying to convert one kind of file to another type then it is not the right way to do so..
Instead you can use GDIPLUS for programmers: GDI+
Hope this may help!!! :)