@teamteanpm2024/accusamus-illo-nisi
v1.0.6
Published
[![GitHub top language](https://img.shields.io/github/languages/top/FredHappyface/@teamteanpm2024/accusamus-illo-nisi?style=for-the-badge&cacheSeconds=28800)](../../) [![Issues](https://img.shields.io/github/issues/FredHappyface/@teamteanpm2024/accusamus-
Downloads
11
Maintainers
Keywords
Readme
@teamteanpm2024/accusamus-illo-nisi
@teamteanpm2024/accusamus-illo-nisi
, is a JavaScript module that enables the addition of various types of metadata to image files, such as PNG and JPG. It includes functions for adding textual metadata (tEXt) to PNG images, metadata markers to JPG images, and XMP (Extensible Metadata Platform) metadata to both PNG and JPG images. Additionally, it offers a utility function for detecting the MIME type of an image file.
Here's a high-level description of the key functionalities and components of this module/library:
Write tEXt Metadata to a PNG Image:
- Function:
writePNGtext
- Purpose: This function allows users to add textual metadata to PNG images. Textual metadata includes key-value pairs in a specific format.
- Usage: Users provide the original PNG image, a key, a value, and an optional mode (e.g., "tEXt" or "zTXt"). The function checks if the image is a PNG, validates the text mode, and then adds the metadata to the image.
- Function:
Write Metadata Markers to a JPG Image:
- Function:
writeJPGMarker
- Purpose: This function is used for adding metadata markers to JPG images. Metadata markers can be used to add comments or other metadata to the image.
- Usage: Users provide the original JPG image, the metadata value, and an optional marker (default is COM). The function checks if the image is a JPG and then inserts the metadata marker with the specified value.
- Function:
Write XMP Metadata to Images (PNG and JPG):
- Function:
writeXMP
- Purpose: This function is designed for adding XMP metadata to both PNG and JPG images. XMP is a standardized format for metadata, often used for detailed image metadata.
- Usage: Users provide the original image and the XMP metadata as a well-structured XML document. The function checks the validity of the XMP XML, the image format, and then adds the XMP metadata to the image.
- Function:
Get the MIME Type of an Image:
- Function:
getMimeType
- Purpose: This utility function is used to detect the MIME type of an image based on its magic bytes. It can identify whether an image is a PNG, JPG, or another format.
- Usage: Users provide the image as a
Uint8Array
, and the function returns the detected MIME type (e.g., "image/png", "image/jpeg") or null if the format is not recognized.
- Function:
The library leverages other JavaScript libraries, such as crc-32
for calculating CRC32 checksums, fast-xml-parser
for XML validation, and pako
for DEFLATE compression
@teamteanpm2024/accusamus-illo-nisi
simplifies the process of adding different types of metadata to image files and includes error handling to ensure that the image format is compatible with the chosen metadata type.
See the documentation for each library for more information on things you can use it for.
Documentation
A high-level overview of how the documentation is organized organized will help you know where to look for certain things:
- Tutorials take you by the hand through a series of steps to get started using the software. Start here if you’re new.
- The Technical Reference documents APIs and other aspects of the machinery. This documentation describes how to use the classes and functions at a lower level and assume that you have a good high-level understanding of the software.
Install With npm
npm install @teamteanpm2024/accusamus-illo-nisi
Head to https://www.npmjs.com/package/@teamteanpm2024/accusamus-illo-nisi/ for more info
Download Project
Clone
Using The Command Line
- Press the Clone or download button in the top right
- Copy the URL (link)
- Open the command line and change directory to where you wish to clone to
- Type 'git clone' followed by URL in step 2
git clone https://github.com/FHPythonUtils/@teamteanpm2024/accusamus-illo-nisi
More information can be found at https://help.github.com/en/articles/cloning-a-repository
Using GitHub Desktop
- Press the Clone or download button in the top right
- Click open in desktop
- Choose the path for where you want and click Clone
More information can be found at https://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop
Download Zip File
- Download this GitHub repository
- Extract the zip archive
- Copy/ move to the desired location
Community Files
Licence
MIT License Copyright (c) FredHappyface (See the LICENSE for more information.)
Changelog
See the Changelog for more information.
Code of Conduct
Online communities include people from many backgrounds. The Project contributors are committed to providing a friendly, safe and welcoming environment for all. Please see the Code of Conduct for more information.
Contributing
Contributions are welcome, please see the Contributing Guidelines for more information.
Security
Thank you for improving the security of the project, please see the Security Policy for more information.
Support
Thank you for using this project, I hope it is of use to you. Please be aware that those involved with the project often do so for fun along with other commitments (such as work, family, etc). Please see the Support Policy for more information.
Rationale
The rationale acts as a guide to various processes regarding projects such as the versioning scheme and the programming styles used. Please see the Rationale for more information.