mirror of
https://github.com/diced/zipline.git
synced 2025-12-05 20:40:12 -08:00
fix: actually write new buffer to file (gps removal)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user