Can't upload BMP files

See all posts Reply

Can't upload BMP files new!
by Leon, 17 years, 11 months ago
When I try to upload BMP files, I get this error:

Can't read image source. not an image?

I tried with several BMP files and no luck.Reply
Re: Can't upload BMP files new!
by colin, 17 years, 11 months ago
The class can't do image manipulation on BMP file. This is a GD limitation. This question is covered in the faq.Reply
Re: Can't upload BMP files new!
by Leon, 17 years, 11 months ago
OK, I missed that. Is there an option to warn the user in case he attempts to upload a BMP file, rather than displaying an error message?Reply
Re: Can't upload BMP files new!
by colin, 17 years, 11 months ago
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