mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-12 10:47:05 +02:00
...
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user