1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

tweeking thumbnail generation sizes

fixing thumbnail selection algorithm
This commit is contained in:
Patrik J. Braun 2019-12-29 12:09:08 +01:00
parent 2663ed49e7
commit 6c458e2dbb
4 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ To configure it, run `PiGallery2` first to create `config.json` file, then edit
The app has a nice UI for settings, you may use that too. The app has a nice UI for settings, you may use that too.
Default user: `admin` pass: `admin` Default user: `admin` pass: `admin`
**Note**: First run, you might have file access issues and port 80 issue. **Note**: First run, you might have file access issues and port 80 issue, see [#115](https://github.com/bpatrik/pigallery2/issues/115).
Running `npm start -- --Server-port=8080` will start the app on port 8080 that does not require `root` Running `npm start -- --Server-port=8080` will start the app on port 8080 that does not require `root`
Adding read/write permissions to all files can solve the file access issue `chmod -R o-w .`, see [#98](https://github.com/bpatrik/pigallery2/issues/98). Adding read/write permissions to all files can solve the file access issue `chmod -R o-w .`, see [#98](https://github.com/bpatrik/pigallery2/issues/98).

View File

@ -81,7 +81,7 @@ export class PrivateConfigDefaultsClass extends PublicConfigClass implements IPr
{ {
name: DefaultsJobs[DefaultsJobs['Thumbnail Generation']], name: DefaultsJobs[DefaultsJobs['Thumbnail Generation']],
jobName: DefaultsJobs[DefaultsJobs['Thumbnail Generation']], jobName: DefaultsJobs[DefaultsJobs['Thumbnail Generation']],
config: {sizes: [160]}, config: {sizes: [240]},
trigger: { trigger: {
type: JobTriggerType.after, type: JobTriggerType.after,
afterScheduleName: DefaultsJobs[DefaultsJobs.Indexing] afterScheduleName: DefaultsJobs[DefaultsJobs.Indexing]

View File

@ -135,7 +135,7 @@ export class PublicConfigClass {
}, },
Thumbnail: { Thumbnail: {
concurrentThumbnailGenerations: 1, concurrentThumbnailGenerations: 1,
thumbnailSizes: [160, 240, 480], thumbnailSizes: [240, 480],
iconSize: 45, iconSize: 45,
personThumbnailSize: 200 personThumbnailSize: 200
} }

View File

@ -21,7 +21,7 @@ export class Media extends MediaIcon {
} }
getThumbnailSize() { getThumbnailSize() {
const longerEdge = Math.max(this.renderWidth * this.renderHeight); const longerEdge = Math.max(this.renderWidth, this.renderHeight);
return Utils.findClosestinSorted(longerEdge, Media.sortedThumbnailSizes); return Utils.findClosestinSorted(longerEdge, Media.sortedThumbnailSizes);
} }