When you say you can't get BMP or PNG, are you saying they won't upload with the current code you have there?
If that is the case, make sure the files you are working with truly are bitmap and png files. I have seen several cases where the extension is not really what the file is. You may need to the check the properties of said files to ensure the MIME they contain is what it is supposed to be.
Best regards,
Brian