1--TEST--
2Set and get image resolution of PNG images
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9$filename = __DIR__ . DIRECTORY_SEPARATOR . 'imageresolution_png.png';
10
11$exp = imagecreate(100, 100);
12imagecolorallocate($exp, 255, 0, 0);
13
14imageresolution($exp, 71);
15imagepng($exp, $filename);
16$act = imagecreatefrompng($filename);
17var_dump(imageresolution($act));
18
19imageresolution($exp, 71, 299);
20imagepng($exp, $filename);
21$act = imagecreatefrompng($filename);
22var_dump(imageresolution($act));
23?>
24===DONE===
25--EXPECT--
26array(2) {
27  [0]=>
28  int(71)
29  [1]=>
30  int(71)
31}
32array(2) {
33  [0]=>
34  int(71)
35  [1]=>
36  int(299)
37}
38===DONE===
39--CLEAN--
40<?php
41@unlink(__DIR__ . DIRECTORY_SEPARATOR . 'imageresolution_png.png');
42?>
43