bbeer Posted March 7, 2014 Posted March 7, 2014 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!
horst Posted March 7, 2014 Posted March 7, 2014 (edited) 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 March 7, 2014 by horst 6
bbeer Posted March 7, 2014 Author Posted March 7, 2014 horst thanks a lot. the more I learn about PW the more I get amazed. 1
horst Posted March 7, 2014 Posted March 7, 2014 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) 3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now