PUT THIS IN AN HTML FILE
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title>Hue Shift </title>
</head>
<body bgcolor="#000000" text="#000000" link="#0000cc" vlink="#cc0000" alink="#FFffFF">
<div align="center">
<img src="hueshift.php">
</div>
<br />
RELOAD to see hue shift
</body>
</html>

PUT THIS IN A PHP FILE
/* made by ozzythaman, Osman DARCAN in 2003
this is a script for shifting HUE data in an image,
no explanation will be provided, figure it out yourself. play with it see what it does, input file is b2.jpg by default. change it to suit your own needs.
if you still need any explanation you dont deserve to use this.
to try out: put in a html file and change b2.png to an other image file (if not png: change the function to imagecreatefromjpg or whatever) this php file will act as an image itself.
*/
function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
$ar=array(0,0,0,0);
srand(make_seed());
$onetwoorthree=rand(0,2);
$first=rand(0,100)/100;
$second=1-$first;
$ar[$onetwoorthree]=$first;
$ar[$onetwoorthree+1]=$second;
if ($onetwoorthree+1>2)
$ar[0]=$second;
//echo " ".$ar[0]." ".$ar[1]." ".$ar[2];
$im = imagecreatefrompng("b2.png") or die ("Cannot Initialize new GD image stream");
header ("Content-type: image/jpeg");
error_reporting(0);
$height=imagesy($im);
$width=imagesx($im);
$im2=imagecreatetruecolor($width,$height);
for ($x=0;$x<$width;$x++){
for ($y=0;$y<$height;$y++){
$rgb = ImageColorAt($im, $x, $y);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
$r2=$r;
$g2=$g;
$b2=$b;
$r=$r2*$ar[0]+$g2*$ar[1]+$b2*$ar[2];
$g=$r2*$ar[2]+$g2*$ar[0]+$b2*$ar[1];
$b=$r2*$ar[1]+$g2*$ar[2]+$b2*$ar[0];
$color = imagecolorallocate($im2, $r, $g, $b);
imagesetpixel($im2,$x,$y,$color);
}
}
imagejpeg($im2,"",80);
?>