Question: can fopen open .bmp file?
Answer: Do not attempt to open or close the file. It is already open. fopen(…) and fclose(…) are not allowed in bmp.