Skip to content

Commit dc248b9

Browse files
authored
Merge pull request #7 from Krzysztofz01/to-nrgba-src-altering-bug-fix
toNRGBA() altering the src image bug fix
2 parents 3e6c47a + cb89c69 commit dc248b9

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

stackblur.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,6 @@ func Process(src image.Image, radius uint32) (*image.NRGBA, error) {
373373
// toNRGBA converts an image type to *image.NRGBA with min-point at (0, 0).
374374
func toNRGBA(img image.Image) *image.NRGBA {
375375
srcBounds := img.Bounds()
376-
if srcBounds.Min.X == 0 && srcBounds.Min.Y == 0 {
377-
if src0, ok := img.(*image.NRGBA); ok {
378-
return src0
379-
}
380-
}
381376
srcMinX := srcBounds.Min.X
382377
srcMinY := srcBounds.Min.Y
383378

0 commit comments

Comments
 (0)