<?php /* Read test png image */ $im = new Imagick( "test.png" ); /* Set opacity to 0.5 */ $im->setImageOpacity( 0.5 ); /* Output the image */ header( "Content-Type: image/png" ); echo $im; ?>