frames := make([]image.Image, len(destination.Bytes())/frameSize)
for i := 0; i < len(frames); i++ {
frameBytes := destination.Bytes()[i*frameSize : (i+1)*frameSize]
- frameImg := &image.RGBA{
+ frameImg := &image.NRGBA{
Pix: frameBytes,
Stride: stride,
Rect: image.Rect(0, 0, w, h),
return img, nil
}
- img := &image.RGBA{
+ img := &image.NRGBA{
Pix: destination.Bytes(),
Stride: stride,
Rect: image.Rect(0, 0, w, h),
sourcefilename: ../testdata/sunset.jpg
-- layouts/home.html --
Home.
-{{ $fuzzyCircle := resources.Get "fuzzycircle.png" }}
+{{ $fuzzyCircle := resources.Get "fuzzycircle.webp" }}
{{ $highContrast := resources.Get "highcontrast.webp" }}
{{ $sunset := resources.Get "sunset.jpg" }}
{{ $sunsetGrayscale := $sunset.Filter (images.Grayscale) }}