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