Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function imageStringDown( &$image, $font, $x, $y, &$s, &$col )
- {
- $fw = imagefontwidth( $font);
- $fh = imagefontheight( $font);
- $fontspacing = 0;
- $fx = $x;
- $fy = $y;
- for( $n=0; $n<strlen( $s ); $n++ )
- {
- $myc = $s{$n};
- imagestring( $image, $font, $fx, $fy, $myc, $col );
- $fy += ($fontspacing + $fh );
- }
- }
- $img_handle = imagecreatetruecolor(25, 170);
- $back_color = ImageColorAllocateAlpha($img_handle, 0, 0, 0, 127);
- $txt_color = ImageColorAllocate($img_handle, 0, 0, 0);
- ImageFill($img_handle, 0, 0, $back_color);
- ImageStringDown ($img_handle, 5, 8, 5, $_GET['text'], $txt_color);
- //-- Output File --
- header ("Content-type: image/png");
- ImageSaveAlpha($img_handle, true);
- ImagePng($img_handle);
- ImageDestroy($img_handle);
- ?>
Add Comment
Please, Sign In to add comment