Improved quality for low DPI screens
This commit is contained in:
parent
44369cb916
commit
6aa10bfb6b
@ -48,6 +48,11 @@ func configureAssets(app *aero.Application) {
|
||||
return ctx.File("images/brand/" + ctx.Get("file"))
|
||||
})
|
||||
|
||||
// Anime images
|
||||
app.Get("/images/anime/*file", func(ctx *aero.Context) string {
|
||||
return ctx.File("images/anime/" + ctx.Get("file"))
|
||||
})
|
||||
|
||||
// Cover image
|
||||
app.Get("/images/cover/:file", func(ctx *aero.Context) string {
|
||||
file := strings.TrimSuffix(ctx.Get("file"), ".webp")
|
||||
|
@ -72,6 +72,10 @@ func work(anime *arn.Anime) error {
|
||||
webpQuality := 70
|
||||
jpegQuality := 70
|
||||
|
||||
qualityBonusLowDPI := 10
|
||||
qualityBonusMedium := 10
|
||||
qualityBonusSmall := 10
|
||||
|
||||
kitsuOriginal := fmt.Sprintf("https://media.kitsu.io/anime/poster_images/%s/original", anime.ID)
|
||||
|
||||
system := ipo.System{
|
||||
@ -113,7 +117,7 @@ func work(anime *arn.Anime) error {
|
||||
Directory: large,
|
||||
BaseName: anime.ID,
|
||||
Size: largeSize,
|
||||
Quality: jpegQuality,
|
||||
Quality: jpegQuality + qualityBonusLowDPI,
|
||||
},
|
||||
&outputs.ImageFile{
|
||||
Directory: large,
|
||||
@ -126,7 +130,7 @@ func work(anime *arn.Anime) error {
|
||||
BaseName: anime.ID,
|
||||
Size: largeSize,
|
||||
Format: "webp",
|
||||
Quality: webpQuality,
|
||||
Quality: webpQuality + qualityBonusLowDPI,
|
||||
},
|
||||
&outputs.ImageFile{
|
||||
Directory: large,
|
||||
@ -141,7 +145,7 @@ func work(anime *arn.Anime) error {
|
||||
Directory: medium,
|
||||
BaseName: anime.ID,
|
||||
Size: mediumSize,
|
||||
Quality: jpegQuality,
|
||||
Quality: jpegQuality + qualityBonusLowDPI + qualityBonusMedium,
|
||||
},
|
||||
&outputs.ImageFile{
|
||||
Directory: medium,
|
||||
@ -154,7 +158,7 @@ func work(anime *arn.Anime) error {
|
||||
BaseName: anime.ID,
|
||||
Size: mediumSize,
|
||||
Format: "webp",
|
||||
Quality: webpQuality,
|
||||
Quality: webpQuality + qualityBonusLowDPI + qualityBonusMedium,
|
||||
},
|
||||
&outputs.ImageFile{
|
||||
Directory: medium,
|
||||
@ -169,7 +173,7 @@ func work(anime *arn.Anime) error {
|
||||
Directory: small,
|
||||
BaseName: anime.ID,
|
||||
Size: smallSize,
|
||||
Quality: jpegQuality,
|
||||
Quality: jpegQuality + qualityBonusLowDPI + qualityBonusSmall,
|
||||
},
|
||||
&outputs.ImageFile{
|
||||
Directory: small,
|
||||
@ -182,7 +186,7 @@ func work(anime *arn.Anime) error {
|
||||
BaseName: anime.ID,
|
||||
Size: smallSize,
|
||||
Format: "webp",
|
||||
Quality: webpQuality,
|
||||
Quality: webpQuality + qualityBonusLowDPI + qualityBonusSmall,
|
||||
},
|
||||
&outputs.ImageFile{
|
||||
Directory: small,
|
||||
|
Loading…
Reference in New Issue
Block a user