Skip to content

Commit 971f227

Browse files
committed
Switch to fill, and linear kernel
1 parent cac0a8a commit 971f227

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/hashing.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ export async function computeHashesFromStream(
5454
}
5555

5656
if (resize) {
57-
const resizer = sharp().resize(448, 448).raw({ depth: 'char' });
57+
const resizer = sharp()
58+
.removeAlpha()
59+
.resize(448, 448, { fit: 'fill', kernel: 'linear' })
60+
.raw({ depth: 'char' });
5861
stream.pipe(resizer);
5962
const rgbData = await resizer.toBuffer();
6063
// Sharp outputs RGB format, but Athena expects BGR - swap R and B channels

0 commit comments

Comments
 (0)