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:
$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?

kirkroberts
 
kirkroberts replied on at Permalink Reply
kirkroberts
D'oh! Totally my error: not realizing the original was square with a white background (it was late at night and... yeah, that was lame). Everything works as expected.

Man, I wish it was possible to delete threads :-)