We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e2da52 commit 63c268cCopy full SHA for 63c268c
src/lib/gps/index.ts
@@ -1,6 +1,6 @@
1
// heavily modified from @xoi/gps-metadata-remover to fit the needs of zipline
2
3
-import { readFileSync } from 'fs';
+import { readFileSync, writeFileSync } from 'fs';
4
import {
5
PNG_TAG,
6
PNG_IEND,
@@ -136,5 +136,9 @@ export function removeGps(input: Buffer | string): boolean {
136
removed = stripGpsFromTiff(buffer, tiffIfdOffset, littleEndian);
137
}
138
139
+ if (removed && typeof input === 'string') {
140
+ writeFileSync(input, buffer);
141
+ }
142
+
143
return removed;
144
0 commit comments