Intermediate pictures bad quality Intermediate pictures bad quality
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Intermediate pictures bad quality

Started by Loki66, September 12, 2007, 01:25:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Loki66

Hello,

The quality of the intermediate pictures is very bad - I tried ImageMagick and GD with the same result.

I have put the quality to 80 (work well usually) then 100 ...

http://faerie.monstrous.com/gallery/index.php

Please advise,

LK

Nibbler

It's not bad quality - it's the wrong size and is being stretched to fit. Something is wrong/misconfigured with the theme you are using. Put the quality back down to 80 or you will eat your users' bandwidth. Also, what dimensions did you set for the intermediate image in config?

Loki66

I put the size to 275 and then tried to decrease it but it does not seem to change ....

How can I fix that with the template ?

Thanks,

Loïc

Nibbler

Change the dimensions to max height and 420. Then rebuild your intermediate images and maybe thumbs too in config. If you don't want to do that then search the board for andreas09 and read up on how the theme changes the intermediate image size.

Loki66

"To correctly display large intermediate images, I've change the function compute_img_size($width, $height) to resize any intermediate image larger than 420 pixels wide. This will keep the auto scroll bar from appearing on monitors or window sizes of 800 pixels wide. If you want it to be larger, change "$max = 420;" in this function."  in the readme of that nice theme.

I am no programmer but I think that new function is buggy. I remove the following lines in the theme.php and it seems to work. Let me know if it is the right thing to do !

Thanks,

Loïc




/* Image scaled version
* Uses new function: compute_img_size_max() to set max intermediate image size for narrow themes
*/

----------------------------------------------------------------


function compute_img_size_max($width, $height)
{
         global $CONFIG;
        $thumb_use=$CONFIG['thumb_use'];
        $max = 420;
        if($thumb_use=='ht') {
          $ratio = $height / $max;
        } elseif($thumb_use=='wd') {
          $ratio = $width / $max;
        } else {
          $ratio = max($width, $height) / $max;
        }
        if ($ratio > 1.0) {
                $image_size['reduced'] = true;
        }
        $ratio = max($ratio, 1.0);
        $image_size['width'] = ceil($width / $ratio);
        $image_size['height'] = ceil($height / $ratio);
        $image_size['whole'] = 'width="'.$image_size['width'].'" height="'.$image_size['height'].'"';
        if($thumb_use=='ht') {
          $image_size['geom'] = ' height="'.$image_size['height'].'"';
        } elseif($thumb_use=='wd') {
          $image_size['geom'] = 'width="'.$image_size['width'].'"';
        } else {
          $image_size['geom'] = 'width="'.$image_size['width'].'" height="'.$image_size['height'].'"';
        }



        return $image_size;
}

Loki66

Now it seems that I cannot click and get the original pictures :-(

Stramm

cause the orig pictures are smaller in size that the values you've set for intermediate images. If intermediate would be clickable you'd show the same pic again as fullsized pic.

Loki66

No the original pictures are larger, maybe it is resizing the thumbs instead of the originals ??

Joachim Müller

Post a link to your gallery for a start. The URL you posted in your original posting doesn't point to a coppermine-driven gallery.