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