0

我想在图像上写带有表情符号的印地语文本,请帮助解决这个问题

हमारी बराबरी English

我想在 500*600 png/jpeg 图像上写上面的文字。这是我尝试过的代码

function screen1(){

    $image_1 = imagecreatefromjpeg("Slice/$this->folder_number/screen-1-bg.png");

    imagealphablending($image_1, true);
    imagesavealpha($image_1, true);

     //fonting

     $white = imagecolorallocate($image_1, 255, 255, 255);
     $grey = imagecolorallocate($image_1, 128, 128, 128);
     $black = imagecolorallocate($image_1, 0, 0, 0);

     $text = 'हमारी बराबरी  English';
     $font = ('Slice/font/hindi-font');
     imagettftext($image_1, 23, 0, 161, 413, $grey, $font, $text);
     imagettftext($image_1, 30, 0, 160, 434, $white, $font, $text);


    imagepng($image_1, "Slice/$this->folder_number/output/screen-1.png");
}
4

0 回答 0