]> granicus.if.org Git - php/commit
Implement #65038: IMAGETYPE_WEBP constant missing
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 7 Oct 2016 17:25:59 +0000 (19:25 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 7 Oct 2016 22:02:21 +0000 (00:02 +0200)
commit14d4ee93a8130c90ee7eb2a7136b7b299bdc0a3b
tree2e0e99235659e7275d972af280a76bad2de01428
parent61bf62a7c0b29a4bca9f681bae79bfdbd46910f1
Implement #65038: IMAGETYPE_WEBP constant missing

We add WebP support for getimagesize(), getimagesizefromstring)(),
image_type_to_extension() and image_type_to_mime_type(). For now we
care only about the simple lossy WebP format (VP8) and ignore the
lossless (VP8L) and extended (VP8X) formats. We use image/webp as MIME
type as it appears to be pretty common, even though it is not yet
registered with IANA.

Relevant specifications:
 * <https://developers.google.com/speed/webp/docs/riff_container>
 * <https://tools.ietf.org/html/rfc6386>
UPGRADING
ext/standard/image.c
ext/standard/php_image.h
ext/standard/tests/image/getimagesize.phpt
ext/standard/tests/image/image_type_to_extension.phpt
ext/standard/tests/image/image_type_to_mime_type.phpt
ext/standard/tests/image/image_type_to_mime_type_basic.phpt
ext/standard/tests/image/image_type_to_mime_type_variation3.phpt
ext/standard/tests/image/test3pix.webp [new file with mode: 0644]