문제

I'm using phpThumb (mainly because of the excellent reflection addon) and need to resize an image to a specific height, and the width be taken care of automatically (dynamic).

Looking at the documentation, it seems to require both width and height parameters: https://github.com/masterexploder/PHPThumb/wiki/Basic-Usage

Is there any way around this or do I have to resort to the usual GD image method?

도움이 되었습니까?

해결책

I'm not sure what you mean with the usual GD image method but if you use getimagesize (yes, GD...) to get the image dimensions, you can easily calculate the new width and use phpThumb like you do now.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top