Removed thumb quality setting
This commit is contained in:
parent
861c010cb7
commit
c4c2e9169e
@ -22,12 +22,6 @@ All settings are stored in the database. You can change the properties manually,
|
||||
|
||||
Your photos and albums are protected by a username and password. If both rows are empty, Lychee will prompt you to set them.
|
||||
|
||||
#### Thumb Quality
|
||||
|
||||
thumbQuality = [0-100]
|
||||
|
||||
Less means an inferiority quality of your thumbs, but faster loading. More means a better quality of your thumbs, but slower loading. The default value is 90. The allowed values are between 0 and 100.
|
||||
|
||||
#### Check For Updates
|
||||
|
||||
checkForUpdates = [0|1]
|
||||
|
@ -285,6 +285,9 @@ final class Photo {
|
||||
// Call plugins
|
||||
Plugins::get()->activate(__METHOD__, 0, func_get_args());
|
||||
|
||||
// Quality of thumbnails
|
||||
$thumbQuality = 90;
|
||||
|
||||
// Size of the thumbnail
|
||||
$newWidth = 200;
|
||||
$newHeight = 200;
|
||||
@ -299,7 +302,7 @@ final class Photo {
|
||||
// Read image
|
||||
$thumb = new Imagick();
|
||||
$thumb->readImage($url);
|
||||
$thumb->setImageCompressionQuality(Settings::get()['thumbQuality']);
|
||||
$thumb->setImageCompressionQuality($thumbQuality);
|
||||
$thumb->setImageFormat('jpeg');
|
||||
|
||||
// Copy image for 2nd thumb version
|
||||
@ -346,12 +349,12 @@ final class Photo {
|
||||
|
||||
// Create thumb
|
||||
fastImageCopyResampled($thumb, $sourceImg, 0, 0, $startWidth, $startHeight, $newWidth, $newHeight, $newSize, $newSize);
|
||||
imagejpeg($thumb, $newUrl, Settings::get()['thumbQuality']);
|
||||
imagejpeg($thumb, $newUrl, $thumbQuality);
|
||||
imagedestroy($thumb);
|
||||
|
||||
// Create retina thumb
|
||||
fastImageCopyResampled($thumb2x, $sourceImg, 0, 0, $startWidth, $startHeight, $newWidth*2, $newHeight*2, $newSize, $newSize);
|
||||
imagejpeg($thumb2x, $newUrl2x, Settings::get()['thumbQuality']);
|
||||
imagejpeg($thumb2x, $newUrl2x, $thumbQuality);
|
||||
imagedestroy($thumb2x);
|
||||
|
||||
// Free memory
|
||||
|
@ -42,7 +42,6 @@ final class Session {
|
||||
|
||||
// Unset unused vars
|
||||
unset($return['config']['skipDuplicates']);
|
||||
unset($return['config']['thumbQuality']);
|
||||
unset($return['config']['sortingAlbums']);
|
||||
unset($return['config']['sortingPhotos']);
|
||||
unset($return['config']['dropboxKey']);
|
||||
|
@ -6,7 +6,6 @@ VALUES
|
||||
('version',''),
|
||||
('username',''),
|
||||
('password',''),
|
||||
('thumbQuality','90'),
|
||||
('checkForUpdates','1'),
|
||||
('sortingPhotos','ORDER BY id DESC'),
|
||||
('sortingAlbums','ORDER BY id DESC'),
|
||||
|
@ -78,7 +78,6 @@ $settings = Settings::get();
|
||||
# Settings
|
||||
if (!isset($settings['username'])||$settings['username']=='') $error .= ('Error: Username empty or not set in database' . PHP_EOL);
|
||||
if (!isset($settings['password'])||$settings['password']=='') $error .= ('Error: Password empty or not set in database' . PHP_EOL);
|
||||
if (!isset($settings['thumbQuality'])||$settings['thumbQuality']=='') $error .= ('Error: No or wrong property for thumbQuality in database' . PHP_EOL);
|
||||
if (!isset($settings['sortingPhotos'])||$settings['sortingPhotos']=='') $error .= ('Error: Wrong property for sortingPhotos in database' . PHP_EOL);
|
||||
if (!isset($settings['sortingAlbums'])||$settings['sortingAlbums']=='') $error .= ('Error: Wrong property for sortingAlbums in database' . PHP_EOL);
|
||||
if (!isset($settings['plugins'])) $error .= ('Error: No property for plugins in database' . PHP_EOL);
|
||||
|
Loading…
Reference in New Issue
Block a user