Skip to content

image/png: wrong error message in png.Encode #5413

@gopherbot

Description

@gopherbot

by destel.od:

Below is piece of code from png.Encode function

423     mw, mh := int64(m.Bounds().Dx()), int64(m.Bounds().Dy())
424     if mw <= 0 || mh <= 0 || mw >= 1<<32 || mh >= 1<<32 {
425         return FormatError("invalid image size: " + strconv.FormatInt(mw, 10) +
"x" + strconv.FormatInt(mw, 10))
426     }

Error message does not contain image height, but contains image width twice.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions