coteh / exifremove Goto Github PK
View Code? Open in Web Editor NEW:sparkler: Dependency-free Node.js module for removing EXIF metadata from JPEG images
License: MIT License
:sparkler: Dependency-free Node.js module for removing EXIF metadata from JPEG images
License: MIT License
Version 1.5.0 of Extensions to PNG 1.2 Specification (seen here) has added an EXIF chunk to PNG data format.
Evaluate whether this should be supported in exifremove, and how best to introduce the support.
Although this is called exifremove
not iptcremove
, we can provide an option to scrub IPTC as well.
https://stackoverflow.com/questions/31120222/iptc-metadata-automatically-added-to-uploaded-images-on-facebook
https://www.reddit.com/r/privacy/comments/ccndcq/facebook_is_embedding_tracking_data_inside_the/
Facebook appends IPTC data to images you download from Facebook to track your activity on the web. It would be nice if there was a way to scrub these out as well. (Although, you can currently use something like exiv2 today to do it)
The guys over at exiv2 have an excellent document on where the APP13 segments that define IPTC are defined.
https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files
Instead have verbose mode emit events, and a printer from the caller side (whether that would be cli or another dependent) will subscribe to those events and print out what's being sent from the module.
Also remove all irrelevant messages that were useful during development but don't make sense now.
https://codecov.io/gh/Coteh/exifremove/src/master/src/exifremove.js
With this part isolated out from the main module and appropriate tests added to ensure data is being passed correctly, the module should be able to hit 100% coverage.
Add a path to the bin in its package.json
Add more tests if necessary.
To differentiate EXIF APP1 segment from other APP1 segments (e.g. XMP), we should also check for the "Exif\0\0" string that occurs immediately after the EXIF offset. (Hex: 4578 6966 000)
Source: https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files
Currently image traversal is linear. Could optimize it a bit by taking the size value beside each application marker and skipping ahead by that amount.
Also, perhaps the iteration logic can be separated from the remove
function logic. That way, these two validation methods in the test library can also make use of the iteration logic to more quickly verify absence of APP1 marker.
TO DO
Specify name of output
There should be no EXIF metadata after the Start of Scan (SOS) begins.
Source: https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files
TO DO
There shouldn't be any more EXIF metadata after the first APP1 segment is found, but it's still technically possible to have more than one. Perhaps provide option to end after scrubbing the first one, or scan entire SOI-SOS segment of image to find others.
Source: https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.