Jump to content

thumbnails blurred


bbeer
 Share

Recommended Posts

I am using the field type image and resize the image like

<?php

	if($page->images) {

	$options = array(
	  'cropping' => 'center'
	);

	if(count($page->images)) {

		$images = $page->images;

		foreach($images as $i) {
		
		
			$thumb = $i->size(150, 100, $options);
			$alt = '';
			$caption = '';

			if($i->description) {
				$alt = $i->description;
				$caption = $alt;
			} else {
				$alt = $page->title;
				$caption = '';
			}

			echo "<div class=\"sideGallery\"><a href='{$i->url}' rel='shadowbox[gal]' title='$caption'><img src='{$thumb->url}' alt='$alt' class='colorboxThumb'></a></div>\n";
		}
	}
}?>

these images get a heavy blur.

Is there a way to prevent this?

Your help is much appreciated!

Link to comment
Share on other sites

Hi Bbeer,

you can try the sharpening option values:

	$options = array(
	  'cropping' => 'center',
	  'sharpening' => 'medium'  // none | soft | medium | strong
	);

You may also check your default setting in the site/config.php file:

$config->imageSizerOptions = array(
	'upscaling' => true, // upscale if necessary to reach target size?
	'cropping' => true, // crop if necessary to reach target size?
	'autoRotation' => true, // automatically correct orientation?
	'sharpening' => 'soft', // sharpening: none | soft | medium | strong
	'quality' => 90, // quality: 1-100 where higher is better but bigger
	);

EDIT:

if you want to test out different settings, remember to use $thumb->removeVariations() before creating the new thumb.

Edited by horst
  • Like 6
Link to comment
Share on other sites

Yes, same with me! :)

As a sitenote, if you like a post here in the forums (any post, not only that in your threads) you can show that by clicking the [like this] button. This is a forums internal system, not fac*bo*k. There is no harm to use it :)

(I remember that I first realized this after 4 weeks posting and reading here)

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...