Bad image quality on slideshow

Permalink 2 users found helpful
Hi Guys,

$f = File::getByID($imgInfo['fID']);
$thumb = $img->getThumbnail($f, 960, 376);

echo "<div id='slide-{$i}' class='slide' style='background: url({$thumb->src});'>";


gives a bad image quality to my slideshow. How can I call them in original size and quality?

Regards

Torsten

tsilbermann
 
tsilbermann replied on at Permalink Reply
tsilbermann
Any Idea?
hereNT replied on at Permalink Best Answer Reply
hereNT
It seems like there are a couple of ways you can do this.

In the image helper it looks like you can set the value for jpeg compression, by default it is 80. So if you wanted to keep resizing them, you could put this in your site.php:

define('AL_THUMBNAIL_JPEG_COMPRESSION', 100);


Otherwise, if you don't want to resize at all and can be sure that all your images will be the right size you should be able to do something like this:

$f = File::getByID($imgInfo['fID']);
$fPath = $f->getRelativePath(true);
echo "<div id='slide-{$i}' class='slide' style='background: url({$fPath});'>"


Hope that helps.
tsilbermann replied on at Permalink Reply
tsilbermann
That works perfect - thanks a lot! You made my day ;-)