Adding scanlines to images using the GD Library
<?php
$file = "picture.png";
$img = imagecreatefrompng($file);
$width = imagesx($img);
$height = imagesy($img);
$color = imagecolorallocate($img, 0, 0, 0);
for ($i=0; $i<$height; $i++){
if ($i/2 == round($i/2)) {
imageline($img, 0, $i, $width, $i, $color);
}
}
imagepng($img, "scanlines.png");
?>
