You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
Микель
Добрый вечер. Возникла пролема с работой GD в php. Требуется нанести текст на баннер в формате png с частичной прозорачностью.
Текст на банннер наносится,но прозрачные и полупрозрачные участки становятся черными.
Подскажите,плз,как это устранить.
Вот часть кода
header ("Content-type: image/png; charset=windows-1251");
$source = imagecreatefrompng($fichierSource);
$largeurSource = imagesx($source);
$hauteurSource = imagesy($source);
$color = ImageColorAllocate ($source, $red, $green, $blue);
$h = $font_size+5;
for ($i=0;$i<count($banner_text);$i++)
{
$box = imagettftext($source,
$font_size,
0,
$im_width,
$h,
$color,
"fonts/".$font,
iconv("CP1251",
"UTF-8",
$banner_text[$i]) );
$h=$h+$font_size+3;
}
imagepng($source);
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.