How to change html body color created by php header content image?

It can be easily solved using two seperate file html and php.

page.html

<html>
<body>
    <img src="image.php" alt="" />
</body>
</html>

image.php

<?php

header('Content-Type: image/png');
$im = new Imagick('image.png');

$im->setImageFormat("png");

echo $im;

?>