Skip to content

Commit

Permalink
merge r3270 from branch 2.0 to trunk
Browse files Browse the repository at this point in the history
feature 981 added: ability to set the compression level for thumbnail creation.

git-svn-id: http://piwigo.org/svn/trunk@3271 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed May 5, 2009
1 parent 24ed6da commit f3cdd38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion admin/thumbnail.php
Expand Up @@ -118,7 +118,7 @@ function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext)
array_push($page['errors'], '['.$tndir.'] : '.l10n('no_write_access'));
return false;
}
imagejpeg($destImage, $dest_file);
imagejpeg($destImage, $dest_file, $conf['tn_compression_level']);
// freeing memory ressources
imagedestroy( $srcImage );
imagedestroy( $destImage );
Expand Down
4 changes: 4 additions & 0 deletions include/config_default.inc.php
Expand Up @@ -150,6 +150,10 @@
// tn_height : default height for thumbnails creation
$conf['tn_height'] = 128;

// tn_compression_level: compression level for thumbnail creation. 0 is low
// quality, 100 is high quality.
$conf['tn_compression_level'] = 75;

// show_version : shall the version of Piwigo be displayed at the
// bottom of each page ?
$conf['show_version'] = true;
Expand Down

0 comments on commit f3cdd38

Please sign in to comment.