Imagemagick可以将大型tiff文件转换为jpg

时间:2015-04-21 14:19:04

标签: php imagemagick filesize

我通过POST将.tif图像发送到.php文件,该文件应将图像转换为* .jpg并将其返回。

这是convert.php的内容

file_put_contents("tmp.tif", base64_decode($_POST["file"]));

if(isset($_POST["file"])){
    system("convert tmp.tif tmp.jpg");
    echo base64_encode(file_get_contents("tmp.jpg"));
}

现在这项工作非常好,但出于某种原因,如果我尝试转换大小为6MB或更大的文件,“tmp.tif”将为空。

我尝试使用“-quality”“-resize”和“-limit memory”参数,但似乎没有任何效果。我也没有任何错误。

提前致谢

1 个答案:

答案 0 :(得分:1)

感谢“l'L'l” 问题确实是post_max_size不够大