Advertisement
Maki187

Untitled

Mar 19th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <?php
  2. // Load the stamp and the photo to apply the watermark to
  3. $stamp = imagecreatefrompng('LINK SLIKE');
  4. $im = imagecreatefromjpeg('WATERMARK, TJ SLIKA KOJA JE PREKO - PODESENO JE U DESNOM DONJEM UGLU');
  5.  
  6. // Set the margins for the stamp and get the height/width of the stamp image
  7. $marge_right = 10;
  8. $marge_bottom = 10;
  9. $sx = imagesx($stamp);
  10. $sy = imagesy($stamp);
  11.  
  12. // Copy the stamp image onto our photo using the margin offsets and the photo
  13. // width to calculate positioning of the stamp.
  14. imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));
  15.  
  16. // Output and free memory
  17. header('Content-type: image/png');
  18. imagepng($im);
  19. imagedestroy($im);
  20.  
  21.  
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement