lib/uncompng: rearrange Encode argument order

This commit is contained in:
Nigel Tao committed 2026-08-11 09:52:32 +10:00
1 parent 1230506e7c
commit e772ccd47a
4 files changed
+21 -21

No files matched your search

+1 -1
View File
@@ -196,7 +196,7 @@ const (
// pix holds the pixel data, either 1 or 4 bytes per pixel (doubled for
// Depth16) depending on the colorType. width and height are measured in
// pixels. stride is measured in bytes. depth must be either Depth8 or Depth16.
func (e *Encoder) Encode(w io.Writer, pix []byte, width int, height int, stride int, depth Depth, colorType ColorType) error {
func (e *Encoder) Encode(w io.Writer, depth Depth, colorType ColorType, width int, height int, pix []byte, stride int) error {
if (width < 0) || (height < 0) ||
((depth != Depth8) && (depth != Depth16)) ||
(colorType.pngFileFormatEncoding() == 0xFF) {