exif-be-gone
Advanced tools
Comparing version
18
index.js
@@ -147,6 +147,8 @@ "use strict"; | ||
// this chunk is too large, remove everything | ||
return; | ||
} | ||
this.remainingScrubBytes -= pendingChunk.length; | ||
this.pending.length = 0; | ||
else { | ||
this.remainingScrubBytes -= pendingChunk.length; | ||
this.pending.length = 0; | ||
} | ||
return; | ||
} | ||
@@ -158,2 +160,3 @@ if (pendingChunk.length === 0) | ||
this.push(pendingChunk); | ||
this.pending.length = 0; | ||
} | ||
@@ -210,6 +213,8 @@ else { | ||
// this chunk is too large, remove everything | ||
return; | ||
} | ||
this.remainingScrubBytes -= pendingChunk.length; | ||
this.pending.length = 0; | ||
else { | ||
this.remainingScrubBytes -= pendingChunk.length; | ||
this.pending.length = 0; | ||
} | ||
return; | ||
} | ||
@@ -221,2 +226,3 @@ if (pendingChunk.length === 0) | ||
this.push(pendingChunk); | ||
this.pending.length = 0; | ||
} | ||
@@ -223,0 +229,0 @@ else { |
16
index.ts
@@ -126,6 +126,7 @@ import { Transform, type TransformOptions, type TransformCallback } from 'stream' | ||
// this chunk is too large, remove everything | ||
return | ||
} else { | ||
this.remainingScrubBytes -= pendingChunk.length | ||
this.pending.length = 0 | ||
} | ||
this.remainingScrubBytes -= pendingChunk.length | ||
this.pending.length = 0 | ||
return | ||
} | ||
@@ -137,2 +138,3 @@ | ||
this.push(pendingChunk) | ||
this.pending.length = 0 | ||
} else { | ||
@@ -191,6 +193,7 @@ this.pending = [pendingChunk] | ||
// this chunk is too large, remove everything | ||
return | ||
} else { | ||
this.remainingScrubBytes -= pendingChunk.length | ||
this.pending.length = 0 | ||
} | ||
this.remainingScrubBytes -= pendingChunk.length | ||
this.pending.length = 0 | ||
return | ||
} | ||
@@ -202,2 +205,3 @@ | ||
this.push(pendingChunk) | ||
this.pending.length = 0 | ||
} else { | ||
@@ -204,0 +208,0 @@ this.pending = [pendingChunk] |
{ | ||
"name": "exif-be-gone", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Remove EXIF data from your image files.", | ||
@@ -62,2 +62,2 @@ "main": "index.js", | ||
] | ||
} | ||
} |
# Exif be gone | ||
Stream transformer to remove data that could be potentially private. | ||
Zero dependency stream transformer to remove data that could be potentially private. | ||
It currently looks for data in the app1 section that is either exif, xmp, or FLIR and removes it from the stream. | ||
For jpegs and tiffs, it currently looks for data in the app1 section that is either exif, xmp, or FLIR and removes it from the stream. | ||
For png, it looks for `tIME`, `iTXt`, `tEXt`, `zTXt`, `eXIf` and `dSIG` chunks and removes those. | ||
## Installation | ||
@@ -8,0 +10,0 @@ |
Sorry, the diff of this file is not supported yet
30218
1.41%545
1.87%28
7.69%