This commit is contained in:
Kovid Goyal
2025-10-09 20:29:15 +05:30
parent ec7da87905
commit b543956638
2 changed files with 4 additions and 1 deletions

View File

@@ -136,6 +136,9 @@ func develop_resize(spec string, input_data io.ReadSeeker) (err error) {
if err != nil {
return err
}
if err = images_equal(img, rimg); err != nil {
return fmt.Errorf("roundtripped images not equal: %w", err)
}
bimg := rimg.Resize(float64(w)/float64(rimg.Width), float64(h)/float64(rimg.Height))
return images_equal(aimg, bimg)
}

View File

@@ -414,6 +414,6 @@ func NewNRGBAWithContiguousRGBAPixels(p []byte, left, top, width, height int) (*
return &image.NRGBA{
Pix: p,
Stride: bpp * width,
Rect: image.Rectangle{image.Point{left, top}, image.Point{left + width, left + height}},
Rect: image.Rectangle{image.Point{left, top}, image.Point{left + width, top + height}},
}, nil
}