Skip to content

Commit

Permalink
make variable names understandable
Browse files Browse the repository at this point in the history
Co-authored-by: motoki317 <motoki317@gmail.com>
  • Loading branch information
logica0419 and motoki317 authored Dec 9, 2023
1 parent 4b6339b commit afc37e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions service/imaging/processor_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ func (p *defaultProcessor) FitAnimationGIF(srcFile io.Reader, width, height int)
BackgroundIndex: src.BackgroundIndex,
}

rect := image.Rect(0, 0, width, height)
for _, s := range src.Image {
d := image.NewPaletted(rect, s.Palette)
mks2013FilterKernel.Scale(d, rect, s, s.Bounds(), draw.Src, nil)
dst.Image = append(dst.Image, d)
targetBounds := image.Rect(0, 0, width, height)
for _, frame := range src.Image {
destFrame := image.NewPaletted(targetBounds, frame.Palette)
mks2013FilterKernel.Scale(destFrame, targetBounds, frame, frame.Bounds(), draw.Src, nil)
dst.Image = append(dst.Image, destFrame)
}

return imaging2.GifToBytesReader(src)
Expand Down

0 comments on commit afc37e2

Please sign in to comment.