PHP Save Image After imagecopyresampled

后端 未结 6 2258
执笔经年
执笔经年 2021-02-19 16:14
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_heig         


        
6条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 16:52

    add this code

    imagepng($iOut,'pic/mypic.png',3);
    

    & this code to get your pics format from an external source

    $link='http://example.com/example.png';
    echo (substr ($link,strrpos ($link,".")+1));
    

提交回复
热议问题