Fileset pulling in smaller cached images?

Permalink
Hi All

Hope someone can help.

I have built an add-on which pulls images in from a file set, which works great apart from one thing...

It seems to pull in a cached image which is smaller than the one I uploaded making the quality fairly poor.

Any ideas why this is happening?

Your help would be very much appreciated.

senshidigital
 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
You are probably calling something like this:
$ih = Loader::helper('image');
$img = $ih->getThumbnail($file, 600, 400);
$src = $img->src;
$width = $img->width;
$height = $img->height;


What you want to do instead is something like this:
$src = $file->getRelativePath();
$size = @getimagesize($file->getPath());
$width = $size[0];
$height = $size[1];
senshidigital replied on at Permalink Reply
senshidigital
I had this in my code:

$full = $ih->getThumbnail($f, $resizeWidth, $resizeHeight, false);
$image['fullSrc'] = $full->src;
$image['fullWidth'] = $full->width;
$image['fullHeight'] = $full->height;
} else {

taken it out and it worked!

Thanks again Jordan. I owe you lots of pints by now!

Learned a lot this week!