Skip to content

Commit

Permalink
fix tempCanvas size
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Feb 2, 2024
1 parent f108fa0 commit d097eb8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (p *processor) resize(ctx context.Context, src *gif.GIF, width, height int)
// When resizing a frame with transparent pixels, the edge pixels may be
// mixed with the transparent color and produce black jagged noise
// To avoid the noise, pile up frames on this canvas before resizing
tempCanvas = image.NewNRGBA(image.Rect(0, 0, srcHeight, srcWidth))
tempCanvas = image.NewNRGBA(image.Rect(0, 0, srcWidth, srcHeight))

// Uniform image of background color
// nolint:forcetypeassert
Expand Down
Binary file modified testdata/frog_resized.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified testdata/miku_resized.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified testdata/new_year_resized.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d097eb8

Please sign in to comment.