This commit is contained in:
2026-07-20 06:01:51 +07:00
parent 1ed246eec8
commit aed692cffe
12 changed files with 67 additions and 64 deletions

View File

@@ -22,13 +22,13 @@ func resizeRGBA(src *image.RGBA, width, height int) *image.RGBA {
minY := srcBounds.Min.Y
for y := 0; y < height; y++ {
srcY := minY + (y * dy) / height
srcY := minY + (y*dy)/height
for x := 0; x < width; x++ {
srcX := minX + (x * dx) / width
srcX := minX + (x*dx)/width
srcOffset := src.PixOffset(srcX, srcY)
dstOffset := dst.PixOffset(x, y)
copy(dst.Pix[dstOffset:dstOffset+4], src.Pix[srcOffset:srcOffset+4])
}
}