fix: actually write new buffer to file (gps removal)

This commit is contained in:
diced
2025-11-07 22:06:29 -08:00
parent 6e2da52f77
commit 63c268cd1e

View File

@@ -1,6 +1,6 @@
// heavily modified from @xoi/gps-metadata-remover to fit the needs of zipline
import { readFileSync } from 'fs';
import { readFileSync, writeFileSync } from 'fs';
import {
PNG_TAG,
PNG_IEND,
@@ -136,5 +136,9 @@ export function removeGps(input: Buffer | string): boolean {
removed = stripGpsFromTiff(buffer, tiffIfdOffset, littleEndian);
}
if (removed && typeof input === 'string') {
writeFileSync(input, buffer);
}
return removed;
}