I have an image with an example dimension of 1600x1200, i would like to resize it down to width: 1024 using PHP.
How do i calculate the height if i only know the desired width?
I know this works on the command line but it calculates the height for me:
mogrify -resize 1024 someimage.jpg
I am looking to calculate the height in code since php doesn't have any functions that do it for you and they all require the height to be specified.
Thanks