Fixed bug #67024 - getimagesize should recognize BMP files negative height#639
Fixed bug #67024 - getimagesize should recognize BMP files negative height#639GBuella wants to merge 1 commit intophp:masterfrom
Conversation
|
I wonder if this is the best way to do it - according to http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx negative length has different meaning than positive length, so just losing this information does not look the best way. It's better than giving wrong height but maybe there's even better way to do it? |
|
Well, for example getimagesize might also return another boolean field called "topdown". But this would make it not totally backward compatible, for bmp specific data. We do "lose" other information as well, from the bitmap header. We do lose other information from JPEG, etc... headers using getimagesize. Meanwhile, I'm pretty sure getimagesize needs to return the absolute value of height here. That is what users expect, after all, the name suggests this, not other fields of headers. |
|
Comment on behalf of stas at php.net: merged |
No description provided.