I already have a script, but when I start it, so it suits me the error 500 Internal Server Error
Here is the script:
<?php
$file_name = "soubor.txt"; /* this is the file that contains your coordinates */
$lines = file($file_name); /* read the file into an array */
$ne = count($lines); /* count the number of coordinate pairs */
$i = 0; /* set your initial counter */
$image = imagecreatefromjpeg('sál.jpg');
$w = imagesx($image);
$h = imagesy($image);
$watermark = imagecreatefromjpeg('krizek.jpeg');
$ww = imagesx($watermark);
$wh = imagesy($watermark);
while($i<$ne) { /* start looping thru the pairs */
$coords = explode(",", $lines[$i]); /* get the coords of the each element */
$x = $coords[0] - 10; /* calculate upper left point */
$y = $coords[1] - 10;
imagecopy($image, $watermark, $x, $y, 0, 0, $ww, $wh);
header('Content-type: image/jpeg');
imagejpeg($image);
exit();
$i ++;
}
?>