Jump to content

MaxDJs

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

MaxDJs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It don't work. Give it the address of the script In my case: http://localhost/odchyceni_pozice_sedadel/oznacena_sedadla.php <?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('sal.jpg'); $w = imagesx($image); $h = imagesy($image); $watermark = imagecreatefromgif('checkmark.gif'); $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); $i ++; } header('Content-type: image/jpeg'); imagejpeg($image); exit(); ?>
  2. 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 ++; } ?>
  3. It is not homework! It occurred to me to use a watermark, but I do not know if: 1) can be multiple watermarks in one image or only one watermark. 2) I can determine the position of the watermark, or if it fixed the lower right corner. I need advice on how to convert an external file (attached) into the PHP array. [attachment deleted by admin]
  4. I have a picture (attached), where I find the coordinates of black points, because I do not remember any point, so you want every point at which I find coordinates with mark a red cross as watermark. At the coordinates using this script: <?php if(isset($_GET["obrazek_x"])) file_put_contents("soubor.txt",$_GET["obrazek_x"].",".$_GET["obrazek_y"]."\n",FILE_APPEND); ?> Coordinates I save to an external file in this format: 602;744 Could you advise me a solution to mark black points? [attachment deleted by admin]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.