I do have functions that modifies the image.
This is a stripped down version of my code. In fact test.php is a reduced version of something like
<?php
//change this path to match your images directory
$dir ='C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/images';
// make sure the requested image is valid
if (isset($_GET['id']) && ctype_digit($_GET['id']) && file_exists($dir . '/'.
$_GET['id'] . '.jpg')) {
$image = imagecreatefromjpeg($dir . '/' . $_GET['id'] . '.jpg');
} else {
die('invalid image specified');
}
// apply the filter
$effect = (isset($_GET['e'])) ? $_GET['e'] : -1;
switch ($effect) {
case IMG_FILTER_NEGATE:
imagefilter($image, IMG_FILTER_NEGATE);
break;
case IMG_FILTER_GRAYSCALE:
imagefilter($image, IMG_FILTER_GRAYSCALE);
break;
case IMG_FILTER_EMBOSS:
imagefilter($image, IMG_FILTER_EMBOSS);
break;
case IMG_FILTER_GAUSSIAN_BLUR:
imagefilter($image, IMG_FILTER_GAUSSIAN_BLUR);
break;
}
// show the image
header('Content-Type: image/jpeg');
imagejpeg($image, '', 100);
?>
I am trying to answer this problem by severals days, and i'm ready to give up so any help is really appreciated.
Thank you for your answers so far.