메뉴 건너뛰기

프로그램언어

조회 수 29813 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

간단한 예제...


<?php 
/*************************************************************** 
프로그램명 : Text를 GD 이미지로 뿌리기 
작성자 : 윤영식 
***************************************************************/ 
if (!$fontsize) { $fontsize=11; } 

Header ("Content-type: image/png"); 

$bound = ImageTTFBBox($fontsize,0,"fonts/HMTGR.TTF",stripslashes(iconv("EUC-KR","UTF-8",$text))); 
$imgWidth = $bound[2]+2; 
$imgHeight = $fontsize*1.2; 

$im=ImageCreate($imgWidth,$imgHeight); 
$white = ImageColorAllocate ($im, 255, 255, 255); 
$green = ImageColorAllocate ($im, 88, 88, 88); 

ImageTTFText($im,$fontsize,0,0,$imgHeight-1,$green,"fonts/HMTGR.TTF",stripslashes(iconv("EUC-KR","UTF-8",$text))); 

ImagePNG($im); 
ImageDestroy($im); 
?> 


  1. No Image 26Mar
    by
    2021/03/26 Views 623 

    while, for, foreach 속도 비교

  2. No Image 29Apr
    by
    2019/04/29 Views 1356 

    utf-8 문자열을 주어진 바이트로 자르기

  3. No Image 16Jan
    by
    2019/01/16 Views 1381 

    TIME_TO_SEC 시간 포맷

  4. TIFF, GIF 여러장 변환

  5. No Image 06Mar
    by
    2017/03/06 Views 17537 

    text파일에 한줄씩 내용추가하기

  6. No Image 27Feb
    by 조쉬
    2014/02/27 Views 29813 

    Text를 GD 이미지로 뿌리기

  7. No Image 26Mar
    by
    2021/03/26 Views 564 

    substr(), mb_substr(), iconv_substr()

  8. No Image 23Dec
    by
    2016/12/23 Views 20486 

    stripslashes — 따옴표 처리한 문자열을 풉니다

  9. No Image 23Dec
    by
    2016/12/23 Views 20442 

    stripcslashes — addcslashes()로 인용한 문자열을 되돌림

  10. No Image 22Aug
    by
    2016/08/22 Views 21042 

    RSSReader Class 제작 및 Reader 만들기

  11. No Image 16Jan
    by
    2019/01/16 Views 1430 

    RSS json_decone 사용방법

  12. No Image 27Feb
    by
    2014/02/27 Views 29201 

    Record Drag/Drop Position

  13. No Image 23Dec
    by
    2016/12/23 Views 20461 

    quotemeta 모든 메타 문자앞에 역슬래쉬를 붙인 문자열을 반환

  14. No Image 26Mar
    by
    2021/03/26 Views 272 

    printf() sprintf()

  15. No Image 23Dec
    by
    2016/12/23 Views 20843 

    preg_match (정규표현식 매치를 수행합니다)

  16. No Image 26Mar
    by
    2021/03/26 Views 274 

    Predefined Variables (미리 정의된 변수들)

  17. POST값 통째로 인코딩하기

  18. POST, GET으로 배열값 받기(직렬화)

  19. No Image 12Apr
    by
    2014/04/12 Views 22458 

    php한글체크를 위한 정규표현식

  20. No Image 08Jan
    by
    2019/01/08 Views 1316 

    PHP폼 사용시 폼 양식에서 값이 사라질때

Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 ... 17 Next
/ 17

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved