Trouble outputting thumb to right size in page_list block
Permalink
Hi There,
I'm trying to control the size of my thumbnails to 170px x 100px - but the code seems to generate a slightly larger thumb that is 175px x102px.
Here is what I'm using to generate the thumb:
And here's how I'm outputting the markup:
It's been a while so I'm not sure what I've missed sorry.
Cheers
Ben
I'm trying to control the size of my thumbnails to 170px x 100px - but the code seems to generate a slightly larger thumb that is 175px x102px.
Here is what I'm using to generate the thumb:
//IMAGE THUMBS $objThumb = NULL; // Get the file object of the image assigned to the page attribute (if any) $objFile = $cobj->getAttribute('main_image'); // If it's a valid file object... if(is_object($objFile) && $objFile instanceof File && !$objFile->error){ // ...load the image helper and generate its thumbnail $ih = Loader::helper('image'); $objThumb = $ih->getThumbnail($objFile, 170, 100); }
And here's how I'm outputting the markup:
It's been a while so I'm not sure what I've missed sorry.
Cheers
Ben
Cheers