Welcome Guest, Not a member yet? Register   Sign In
image_lib thumbnail quality
#1

[eluser]gRoberts[/eluser]
Hi all...

Can anyone see why my thumbnail quality is poo?

I'm not sure how to display images in here, so i've posted the urls:

Source: http://img219.imageshack.us/img219/7695/dockrg8.jpg
Thumbnail: http://img219.imageshack.us/img219/336/e...07eum9.jpg

Another thing i've noticed is that imageshack behaved differently when uploading the Source, it provided a preview and options whereas it didn't with the thumbnail.

Is there something wrong with the thumbnails?

Heres the code that generates it:

Code:
<?php

    /**
     * @author Gavin Roberts
     * @copyright 2007
     */
    
    class thumbGenerator {
                
        public $imageDir;
        private $base;
                
        public function __construct() {
            
            $this->base =& get_instance();
            $this->base->load->library('image_lib');
            
        }
        
        public function generate($source, $output, $width, $height) {
            
            $config['source_image'] = $source;
            $config['maintain_ratio'] = TRUE;
            $config['create_thumb'] = false;
            $config['new_image'] = $output;
            $config['quality'] = 100;
            $config['width'] = (int)$width;
            $config['height'] = (int)$height;
            
            $this->base->image_lib->initialize($config);
            if(!$this->base->image_lib->resize())
                die($this->base->image_lib->display_errors());
            
        }
        
        public function applyWatermark($to, $watermark) {
            
            $config['source_image'] = $to;
            $config['wm_type'] = 'overlay';
            $config['quality'] = 100;
            $config['wm_overlay_path'] = $watermark;
            $config['wm_opacity'] = 50;
        
            $this->base->image_lib->initialize($config);
            return $this->base->image_lib->watermark();
            
        }
        
    }

?>

Any help is appreciated!

HAPPY NEW YEAR!!!
#2

[eluser]Grahack[/eluser]
I guess you have options because the file and its image is big. The thumbnail is small so the site assumes you don't need any further processing.
Now back to the original problem: I really don't know!!!




Theme © iAndrew 2016 - Forum software by © MyBB