Trouble with getThumbnail only making square images
Permalink
I have a custom block and am creating an image in the view.
Here's the code:
I've done this before with success. The problem here is that no matter what numbers I put in for dimensions the image comes back square with a white background to cover any open areas.
In the above example the image would be 100 x 100 (it's always the smaller of the two numbers). If I put in (140, 1000) the image would be 140 x 140.
No idea why this is or what to do about it. Any ideas?
Here's the code:
$thumb = $ih->getThumbnail($controller->getFileObject(),140,100);
I've done this before with success. The problem here is that no matter what numbers I put in for dimensions the image comes back square with a white background to cover any open areas.
In the above example the image would be 100 x 100 (it's always the smaller of the two numbers). If I put in (140, 1000) the image would be 140 x 140.
No idea why this is or what to do about it. Any ideas?
Man, I wish it was possible to delete threads :-)