![Node.js Takes Steps Towards Removing Corepack](https://cdn.sanity.io/images/cgdhsj6q/production/5fa307ef6135347f38e009b4da8cebcb3b9a386a-1948x1336.png?w=400&fit=max&auto=format)
Security News
Node.js Takes Steps Towards Removing Corepack
Node.js is taking steps towards removing Corepack from its distribution, aiming for changes in the next major release.
exif
Advanced tools
Readme
With node-exif you can extract Exif metadata from images (JPEG). Exif is a format used, for example, by digital cameras and scanners to save additional information about an image in the image file. This information can be the camera model, resolution, where the image was taken (GPS) or when it was taken.
Installing using npm (node package manager):
npm install exif
If you don't have npm installed or don't want to use it:
cd ~/.node_libraries
git clone git://github.com/gomfunkel/node-exif.git exif
Easy. Just require node-exif and throw an image at it. If node-exif is able to extract data from the image it does so and returns an object with all the information found, if an error occurs you will receive an error message. To prove that it really is easy please see the following example.
var ExifImage = require('exif').ExifImage;
try {
new ExifImage({ image : 'myImage.jpg' }, function (error, image) {
if (error)
console.log('Error: '+error.message);
else
console.log(image); // Do something with your data!
});
} catch (error) {
console.log('Error: ' + error);
}
Instead of providing a filename of an image in your filesystem you can also pass a Buffer to ExifImage.
The data returned is an object with a couple of arrays, each of the arrays consists of the metadata extracted from the respective section. Please refer to ExifImage.js for a list of available tags and their meaning, there is a lot of them. This is subject to change, though, as it's not really self explanatory right now.
node-exif is licensed under the MIT License. (See LICENSE)
FAQs
A node.js library to extract Exif metadata from images.
We found that exif demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Node.js is taking steps towards removing Corepack from its distribution, aiming for changes in the next major release.
Security News
OpenSSF has released a guide to help package repositories adopt Trusted Publishers, which enhances security by using short-lived identity tokens for authentication, reducing the risks associated with long-lived secrets.
Employee Spotlight
Philipp Burckhardt recounts his journey from childhood computer fascinations, to building an e-learning platform at Carnegie Mellon University, and on to his current role at Socket.