묻고답하기

안녕하세요~

http://www.grafika.waw.pl/strona/sub/watermark/index.php 요기를 클릭하면 워터마크에 대한 자세한 내용이 있구요..

잘은 모르지만...
출력될 이미지에 makeimg.php를 물려주면

<img src="makeimg.php?photo=original_photo.jpg"> 요러케요~

미리 준비된  watermark.png가 덧입혀져서 웹상에 출력되는 방식인것 같네요~

검색해보니 테크노트에는 적용하는 방법이 있던데--> http://cafe.naver.com/technoteinfo.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=4880

제로보드에 적용을 하려니... 내공이 딸려서~ 안돼서~ 도움을 요청합니다~

게시판에 올려지는 모든 파일에 로고를 삽입하고 싶은데... 테크노트는 3_body.php를 수정하라는데..

제로보드는 어떤 파일을 수정해야 좋을지요....

이런 컴포넌트가 나와도 좋을텐데... 무식해서.. 만들지는 못하겠고..

도와 주세요^^




아래는 makeimg.php 입니다
<?php

/*
   program:      makeimg.php
   description:  creates new image by merging
                 source image with watermark
                 and outputs it to browser
*/


header("Content-Type: image/jpeg");
//(because the script outputs picture)



$transparency = 40; //watermark's transparency (0-100)


//source photo
$source_photo = stripslashes($_GET['photo']);
$photo = imagecreatefromjpeg($source_photo);

//watermark
$watermark = imagecreatefrompng('watermark.png');
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);

//location of the watermark on the source image
$size = getimagesize($source_photo);
$dest_x = ($size[0] - $watermark_width) / 2;
$dest_y = ($size[1] - $watermark_height) / 2;

//make the image (merge source image with watermark)
imagecopymerge($photo, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $transparency);

//output the image
imagejpeg($photo);

//free memory
imagedestroy($photo);
imagedestroy($watermark);

?>
태그 연관 글
  1. [2017/08/06] 묻고답하기 레이아웃 편집에서 logo링크 변경에 관하여 질문 드립니다. by 아까거기서
  2. [2014/06/25] 묻고답하기 레이아웃에서 로고 부분의 크기를 조정하고 싶은데요 by kingcaone *4
  3. [2014/04/09] 묻고답하기 사이트 제목 어떻게 넣나요? by 브라운아이스 *2
  4. [2011/12/26] 묻고답하기 로고 링크 관련 질문 by 디쎔버 *1
  5. [2009/09/01] 묻고답하기 로고 옆 상단메뉴 출력 어떻게 해야하나요 ? by 해미