PNG Transparency Resize with SimpleImage.php Class

前端 未结 4 1960
一个人的身影
一个人的身影 2020-12-05 08:51

I\'m using a modified version of the SimpleImage.php class: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php

The edits I found on phpfreaks (htt

4条回答
  •  爱一瞬间的悲伤
    2020-12-05 08:59

    I did the same as in this https://stackoverflow.com/a/6401135/262462 but edited this part

    function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {
    
    // do this or they'll all go to jpeg
    $image_type=$this->image_type;
    

    to this

    function save($filename, $image_type="original", $compression=75, $permissions=null) {
    
        if ($image_type=="original")
            $image_type=$this->image_type;
    

提交回复
热议问题