Autor | Zpráva | ||
---|---|---|---|
patrezz Profil * |
#1 · Zasláno: 23. 5. 2009, 12:55:52
Zdravíčko :P
Mám taký problém: Pred upgradom som na výpis textu cez GD library používal nasledujúci kód: <?php $id=$_GET['id']; $im = imagecreate (300, 50); $bg_color = imagecolorallocate($im, 255, 255, 255); $font_size = 14; $font = './NazovFontu.ttf'; $text_color = imagecolorallocate($im, 224, 26, 39); imagettftext($im, $font_size, rand(0), 3, 15, $text_color, $font, $id); imagecopy($im, 0, 0, 0, 0, 200, 50); header ("Content-type: image/png"); Imagepng($im); ImageDestroy($im); ?> Ale teraz, mi to vypíše niečo takéto: http://extensa.biz/obrazok/obrazok.php?id=lol Čo s tým? Nenašiel som nič, čo by mi s tým pomohlo... Vopred ďakujem za Vaše reakcie/názory/rady.... |
||
Jan Tvrdík Profil |
#2 · Zasláno: 23. 5. 2009, 13:20:49
Zkus:
<?php $id = $_GET['id']; $im = imagecreate (300, 50); $bg_color = imagecolorallocate($im, 255, 255, 255); $font_size = 14; $font = './NazovFontu.ttf'; $text_color = imagecolorallocate($im, 224, 26, 39); imagettftext($im, $font_size, 0, 3, 15, $text_color, $font, $id); imagecopy($im, $dest, 0, 0, 0, 0, 200, 50); header ("Content-type: image/png"); Imagepng($dest); ImageDestroy($dest); ImageDestroy($im); ?> |
||
patrezz Profil * |
#3 · Zasláno: 23. 5. 2009, 13:24:34
„Zkus:“
„123456789101112131415 <?php$id = $_GET['id'];$im = imagecreate (300, 50);$bg_color = imagecolorallocate($im, 255, 255, 255);$font_size = 14;$font = './NazovFontu.ttf';$text_color = imagecolorallocate($im, 224, 26, 39);imagettftext($im, $font_size, 0, 3, 15, $text_color, $font, $id);imagecopy($im, $dest, 0, 0, 0, 0, 200, 50);header ("Content-type: image/png");Imagepng($dest);ImageDestroy($dest);ImageDestroy($im);?>“ hlási to: Warning: imagecopy(): supplied argument is not a valid Image resource in /var/www/extensa.biz/extensa 2.0 Beta/menuhover.php on line 9 Warning: Cannot modify header information - headers already sent by (output started at /var/www/extensa.biz/extensa 2.0 Beta/menuhover.php:9) in /var/www/extensa.biz/extensa 2.0 Beta/menuhover.php on line 11 Warning: imagepng(): supplied argument is not a valid Image resource in /var/www/extensa.biz/extensa 2.0 Beta/menuhover.php on line 12 Warning: imagedestroy(): supplied argument is not a valid Image resource in /var/www/extensa.biz/extensa 2.0 Beta/menuhover.php on line 13 |
||
Jan Tvrdík Profil |
#4 · Zasláno: 23. 5. 2009, 13:28:07
Další pokus:
<?php $id = $_GET['id']; $im = imagecreate (300, 50); $dest = imagecreate (300, 50); $bg_color = imagecolorallocate($im, 255, 255, 255); $font_size = 14; $font = './NazovFontu.ttf'; $text_color = imagecolorallocate($im, 224, 26, 39); imagettftext($im, $font_size, 0, 3, 15, $text_color, $font, $id); imagecopy($dest, $im, 0, 0, 0, 0, 200, 50); header ("Content-type: image/png"); Imagepng($dest); ImageDestroy($dest); ImageDestroy($im); ?> |
||
patrezz Profil * |
#5 · Zasláno: 23. 5. 2009, 13:32:20
„Další pokus:“
„12345678910111213141516 <?php$id = $_GET['id'];$im = imagecreate (300, 50);$dest = imagecreate (300, 50);$bg_color = imagecolorallocate($im, 255, 255, 255);$font_size = 14;$font = './NazovFontu.ttf';$text_color = imagecolorallocate($im, 224, 26, 39);imagettftext($im, $font_size, 0, 3, 15, $text_color, $font, $id);imagecopy($dest, $im, 0, 0, 0, 0, 200, 50);header ("Content-type: image/png");Imagepng($dest);ImageDestroy($dest);ImageDestroy($im);?>“ už to fičí :) dik moc |
||
patrezz Profil * |
#6 · Zasláno: 23. 5. 2009, 13:50:38
ešte niečo..
ako spravím, aby to malo priehladné pozadie? dik ešte raz |
||
gmvasek Profil |
#7 · Zasláno: 23. 5. 2009, 14:21:23
Základní problém byl v tom, že rand() má dva povinné parametry.
|
||
patrezz Profil * |
#8 · Zasláno: 23. 5. 2009, 17:09:12
hej, ale predsalen stale mam problem s tym, ako urobit priehladne pozadie...
neviete niekto co s tym? :-/ |
||
patrezz Profil * |
#9 · Zasláno: 24. 5. 2009, 08:59:35
hm tak aspon ako urcit pozadie ? napriklad z png suboru....
|
||
Časová prodleva: 15 let
|
0