class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
While I agree that the message is confusing (after all, BMP is an image format), the class should fail if your script request image manipulations on a bitmap.
The thing is, in order for the class to detect a BMP, I would have to open the file and read the first few bytes to check what type of file it is (a BMP file's first two bytes must be BM). So far, if the image can't be read by GD, it is considered as not being an image at all.Reply
Can't read image source. not an image?
I tried with several BMP files and no luck.
The thing is, in order for the class to detect a BMP, I would have to open the file and read the first few bytes to check what type of file it is (a BMP file's first two bytes must be BM). So far, if the image can't be read by GD, it is considered as not being an image at all.