Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support BITMAPV5HEADER in getimagesize() #249

Closed
wants to merge 1 commit into from
Closed

support BITMAPV5HEADER in getimagesize() #249

wants to merge 1 commit into from

Conversation

AsamK
Copy link

@AsamK AsamK commented Dec 30, 2012

the php function getimagesize() doesn't support Bitmaps with ICC color profiles (BITMAPV5HEADER).
The size information is at the same position as Bitmaps with a BITMAPV4HEADER, so just adding a check for the different header size should be enough
https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.28bitmap_information_header.29

@lstrojny
Copy link
Contributor

lstrojny commented Jan 1, 2013

Thanks for your PR. Please add a Testcase for the addition.

@weltling
Copy link
Contributor

weltling commented Jan 8, 2013

@AsamK you should also fix ext\standard\tests\image\image_type_to_mime_type.phpt as it picks up your new image file. Then it should be fine i'd say.

@lstrojny
Copy link
Contributor

@AsamK could you squash your commits, I’ll merge than.

https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.28bitmap_information_header.29

added test image:
ext/standard/tests/image/test1bpix.bmp

and adapted tests:
ext/standard/tests/image/getimagesize.phpt
ext/standard/tests/image/image_type_to_mime_type
@AsamK
Copy link
Author

AsamK commented Jan 14, 2013

I squashed them.
I hope I did it correctly, this is my first pull request on github.

@lstrojny
Copy link
Contributor

Looks good! I’ll try to merge them now.

@php-pulls
Copy link

Comment on behalf of lstrojny at php.net:

Merged into 5.4, 5.5 and master. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants