]> granicus.if.org Git - php/commit
Add PHP bindings for setting and getting the image resolution
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 19 Sep 2016 20:48:22 +0000 (22:48 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 17 Oct 2016 23:53:39 +0000 (01:53 +0200)
commit209d4220d53bce6f4ac4d69a2781e98f47e17710
tree623028aca47f2566c23ea9a9eb0512ef686dc530
parent932c20fb8d7d1b94c1615c8f0cb958f67bc24c53
Add PHP bindings for setting and getting the image resolution

We expose the image resolution related GD functionality to userland
by introducing `imageresolution()` as getter/setter. Given only the
image argument, it returns the current resolution as indexed array.
Given only a second argument, it sets the horizontal and vertical
resolution to this value. Given three arguments, it sets the horizontal
and vertical resolution to the given arguments, respectively.
ext/gd/gd.c
ext/gd/php_gd.h
ext/gd/tests/imageresolution_jpeg.phpt [new file with mode: 0644]
ext/gd/tests/imageresolution_png.phpt [new file with mode: 0644]