zoukankan      html  css  js  c++  java
  • 添加图像

    header("Content-type:image/jpg");              //header头(固定的)
    $i=imagecreate(100,100);                           //创建画布
    $color=imagecolorallocate($i,255,23,140);      //添加背景颜色

    $text=imegecolorallocate($img,255,0,0);          //文字背景色

    imagettftext(image, size, angle, x, y, color, fontfile, text)     //  添加中文文字   (图片,大小,倾斜角度,x轴,y轴,颜色,字体,文字内容)

    imagestring(image, font, x, y, string, color)                     //添加英文文字  (图片,字体大小,x轴,y轴,内容,颜色)

    imageline(image, x1, y1, x2, y2, color)                         //添加直线(图片,起始点,结束点,颜色)
    imagegif($i);                     //输出

  • 相关阅读:
    命令行
    作业三C++
    作业二
    0003---简单的a+b问题
    0002---五层小山
    0001---Hello world
    关于OJ的那些事
    CDQ分治学习笔记
    C++ IO的一些注意点
    Vscode配置C++环境
  • 原文地址:https://www.cnblogs.com/index0629/p/8085037.html
Copyright © 2011-2022 走看看