I have a script for altering a photograph.
<?php
$thefile = $_FILES["thefile"]['tmp_name'];
$image = imagecreatefromjpeg("$thefile");
function pixelate(&$image) {
$imagex = imagesx($image);
$imagey = imagesy($image);
$blocksize = 12;
for ( $x = 0; $x < $imagex; $x += $blocksize) {
for ($y = 0; $y < $imagey; $y += $blocksize) {
$rgb = imagecolorat($image, $x, $y);
imagefilledrectangle($image, $x, $y, $x + $blocksize - 1, $y + $blocksize - 1, $rgb);
}
}
}
pixelate($image);
imagejpeg($image);
imagedestroy($image);
?>
The HTML form for the upload looks like this
<form action="uploaded.php" method="post" enctype="multipart/form-data">
<input type="file" name="thefile" id="thefile">
<input type="hidden" name="MAX_FILE_SIZE", value="30000">
<input type="submit" value="Upload jpeg" name="submit">
</form>
At the moment rather than the image being displayed in the browser I am instead getting question lots of black symbols with question a mark inside