-1

I am fixing up a website that uses phpThumb to generate thumbnails. The documentation/readme is available here.

I am trying to resize the images so that they fit within 1200x1200 pixels, but maintain their aspect ratio and are not cropped.

However, it seems no matter what I do, the images are always cropping. I am trying these options to no avail:

"h" => 1200,
"w" => 1200,
"far" => "C"

I've left out the "zc" or 'Zoom Crop' function to try to avoid cropping, but no matter what, I keep getting a cropped image. Am I missing something? Or is phpThumb not capable of dynamically forcing the image to fit within a given square dimension?

Note Unfortunately we are tied to using phpThumb over an alternative as the site/cms plugin makes use of it exclusively.

waffl
  • 5,179
  • 10
  • 73
  • 123

1 Answers1

0

far = "Force Aspect Ratio" - so you are forcing 1200px by 1200px - remove that and it should work as expected.

GrahamTheDev
  • 22,724
  • 2
  • 32
  • 64
  • I've actually tried it without *far* and it simply crops a 1200x1200 square. – waffl Apr 24 '14 at 13:21
  • then i cant help from the info you provided - the default for phpThumb is to not crop so something must be over-riding it, remove every setting other than width and height. – GrahamTheDev Apr 24 '14 at 15:26