Source of: hr_filter.php


<?php
extract($_GET, EXTR_SKIP|EXTR_PREFIX_ALL|EXTR_REFS, '');

$im = imlib_load_image('test1.tga');
$im2 = imlib_load_image('test2.tga');

$w=imlib_image_get_width($im);
$h=imlib_image_get_height($im);

$out = imlib_create_image($w,$h);
imlib_image_fill_rectangle($out,0,0,$w,$h,255,255,255,255);

imlib_apply_filter($im2,"cm_huerot",array("angle"=>$_ha));

imlib_blend_image_onto_image($im,$im2,1,0,0,$w,$h,0,0,$w,$h,0,1,0);

imlib_blend_image_onto_image($out,$im,1,0,0,$w,$h,0,0,$w,$h,0,1,0);

imlib_image_set_format($out,"jpeg");

Header('Content-type: image/jpeg');

imlib_dump_image($out,$err,80);
?>