PHP Thumb » Help & Bugs » Help

How to specify image quality/compression?

(3 posts)
  1. lasse
    Member

    Hello, I've used PHP Thumb and been very happy with it. However, I can't seem to figure out how to specify a quality setting when saving an image?

    I tried:

    private function _createThumbnail($sourcePath, $destPath, $w, $h, $q)
    {
    $thumb = CB_Image_Thumbnail::create($sourcePath);
    $thumb->resize($w, $h);
    $thumb->save($destPath, $q);
    }

    Posted 1 year ago #
  2. The image quality is only really relevant for JPEG images, and that can be set globally as described here:
    http://trac.gxdlabs.com/projects/phpthumb/wiki/Docs/GettingStarted#Options

    Hope that helps :)

    Posted 1 year ago #
  3. lasse
    Member

    Superb :-)

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.