chore: use better scaling kernel
This commit is contained in:
@@ -3,20 +3,14 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
|
||||||
_ "net/http/pprof"
|
|
||||||
|
|
||||||
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/pkg/config"
|
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/pkg/config"
|
||||||
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/server"
|
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
go func() {
|
|
||||||
http.ListenAndServe("localhost:6060", nil)
|
|
||||||
}()
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ctx, cancle := context.WithCancel(ctx)
|
ctx, cancle := context.WithCancel(ctx)
|
||||||
defer cancle()
|
defer cancle()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ func scale(src image.Image, options Options) image.Image {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Resize:
|
// Resize:
|
||||||
draw.BiLinear.Scale(dst, dst.Rect, src, src.Bounds(), draw.Over, nil)
|
draw.ApproxBiLinear.Scale(dst, dst.Rect, src, src.Bounds(), draw.Over, nil)
|
||||||
|
|
||||||
// Encode to `output`:
|
// Encode to `output`:
|
||||||
return dst
|
return dst
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 439 KiB |
-1976
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 112 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 439 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 439 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 439 KiB |
Reference in New Issue
Block a user