<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 1、為圖像分配顏色imagecolorallocate() * 語法: ``` int imagecolorallocate(resource $image,int $red,int $green,int $blue) ``` * 參數:$image圖像資源標識符; * 提示:第一次對 imagecolorallocate()的調用會給圖像填充背景色。 ![](https://img.kancloud.cn/40/c2/40c2695128f3f4ed275c655f5572b963_758x187.png) ![](https://img.kancloud.cn/7e/22/7e22f085852b612d827e65eda056dd62_806x498.png) ## 2、輸出圖像到瀏覽器或保存文件imagejpeg() * 描述:以 JPG/GIF/PNG 格式將圖像輸出到瀏覽器或文件 * 語法: ``` bool imagejpeg ( resource $image [, string $filename [, int $quality ]] ) ``` * 參數: $filename,將創建的圖像保存到文件;如果省略,則直接在瀏覽器輸出。 如果要省略這個參數而提供 quality 參數,使用NULL。 quality 為可選項,范圍從 0(最差質量,文件更小)到 100(最佳質量,文件最大)。默認的質量值(大約 75)。 * 提示:imagegif()、imagepng(),與imagejpeg()格式一樣,但沒有第3個參數。 ![](https://img.kancloud.cn/fa/a8/faa887709cc6f1df770758306a533721_793x493.png) ![](https://img.kancloud.cn/4e/e2/4ee246950c4f21807490b628be09dfda_820x225.png) ## 3、水平地畫一行字符串imagestring() * 描述:水平地畫一行字符串 * 語法: ``` bool imagestring(resource $img,int $font,int $x,int $y,string $s,int $col) ``` * 參數: $img 圖像資源; $font字體大小,取值1、2、3、4、5,使用內置字體; $x , $y 繪制字符串的開始坐標,一般在字符串左上角; $s 代表要繪制的一行字符串; $col 代表文本顏色。 $s,代表一行字符串;$col,代表文本顏色; ![](https://img.kancloud.cn/0f/7c/0f7c9cc730c22857118778e080f034d5_835x444.png) ## 4、獲取畫布的寬度和高度 * 寬度:int imagesx ( resource $image ) * 高度:int imagesy ( resource $image ) ## 5、獲取內置字體的寬度和高度 * 描述:返回指定字體一個字符寬度或高度的像素值。 * 字體寬度:int imagefontwidth ( int $font ) * 字體高度:int imagefontheight ( int $font ) * 提示:$font為字體大小,取值1-5,最大為5。 ## 6、實例:在圖像上繪制一行居中的字符串 ![](https://img.kancloud.cn/71/b0/71b0695e46e5d6279b52c3665c9ff1c8_509x278.png) ![](https://img.kancloud.cn/a7/1f/a71f093c1e6e69d42d8a66468841b93e_950x578.png) ## 7、畫一矩形并填充 * 描述:畫一矩形并填充 * 語法: ``` bool imagefilledrectangle ( resource $image , int $x1 , int $y1 , int $x2 , int $y2 , int $color ) ``` * 參數: $x1 , $y1 左上角坐標; $x2 , $y2 右上角坐標; $color 填充背景色。 ## 8、畫一個單一像素 * 描述:畫一個單一像素 * 語法: ``` bool imagesetpixel ( resource $image , int $x , int $y , int $color ) ``` * 說明:imagesetpixel() 在 image圖像中用 color顏色在 x,y 坐標(圖像左上角為 0,0)上畫一個點。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看