Imagemagick thumbnail generation with php - using -crop

前端 未结 2 1175
旧时难觅i
旧时难觅i 2021-01-29 04:41

Long ago I created a small library for resizing images using imagemagick through system(...) because I did not feel that the build-in imagemagick functions for PHP

2条回答
  •  死守一世寂寞
    2021-01-29 05:23

    I tell one suggestion you can try it,

    I saw the Image link I think the conditions are not checked correctly.

    you have checked condition [(width/height) > (maxWidth/maxHeight)] Instead of check

    if(width == height) { } elseif(width > height) { } else(width < height){ }

    Check this condition and according to this condition crop the image and resize.

    Thank you

提交回复
热议问题