久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      如何解決php imagepng報(bào)錯(cuò)問題

      php imagepng報(bào)錯(cuò)是因?yàn)镮magePNG生成圖像的質(zhì)量范圍是從0到9的,當(dāng)傳入該范圍以外的參數(shù)則該函數(shù)不會(huì)工作,其解決辦法就是將值更改為0到9之間,錯(cuò)誤會(huì)自行消失。

      如何解決php imagepng報(bào)錯(cuò)問題

      本文操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      如何解決php imagepng報(bào)錯(cuò)問題?

      php上傳圖片時(shí)報(bào)錯(cuò):gd-png error: compression level must be 0 through 9

      報(bào)錯(cuò)問題

      Warning: imagepng(): gd-png error: compression level must be 0 through 9
      如何解決php imagepng報(bào)錯(cuò)問題

      解決方法

      JPEG圖像生成的圖像的質(zhì)量的是一個(gè)范圍從0(最低質(zhì)量,最小的文件大?。┑?00(最高質(zhì)量,最大文件大?。?/p>

      imagejpeg($imgSource, $path, 100);

      而出現(xiàn)這一錯(cuò)誤的原因是因?yàn)镮magePNG生成圖像的質(zhì)量范圍從0到9的,傳入的這個(gè)范圍以外的參數(shù)則該函數(shù)不會(huì)工作。所以,簡單地將值更改為0到9之間,錯(cuò)誤會(huì)自行消失。

      imagepng($imgSource, $path, 9);

      推薦學(xué)習(xí):《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)