Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
MetaZap is a powerful Python library designed for efficient removal and replacement of metadata from various image file formats. Perfect for photographers, developers, and privacy-conscious users seeking to maintain control over their digital image information.
Get started with MetaZap in seconds:
pip install metazap
Remove specific metadata fields:
from metazap import remove_fields_from_file
remove_fields_from_file("original.jpg", ["Artist", "Copyright"], "cleaned.jpg")
Replace metadata fields:
from metazap import replace_fields_in_file
replace_fields_in_file("original.jpg", {"Artist": "Jane Doe", "Copyright": "2024"}, "updated.jpg")
Remove and replace metadata fields:
from metazap import remove_and_replace_fields_in_file
remove_and_replace_fields_in_file("original.jpg", ["GPSInfo"], {"Artist": "Jane Doe"}, "processed.jpg")
import metazap as mz
INPUT_DIR = "raw_images"
OUTPUT_DIR = "processed_images"
SENSITIVE_FIELDS = [
"GPSInfo",
"SerialNumber",
"CameraSerialNumber",
"ImageDescription",
"CameraOwnerName",
]
DEFAULT_METADATA = {
"Artist": "Anonymous",
"Creator": "Anonymous",
"Copyright": "All Rights Reserved",
"License": "CC BY-NC-ND 4.0",
"DateTime": "2024:01:01 00:00:00",
}
def main():
mz.remove_and_replace_fields_in_dir(INPUT_DIR, SENSITIVE_FIELDS, DEFAULT_METADATA, OUTPUT_DIR)
if __name__ == "__main__":
main()
remove_fields_from_file(input_file: Union[str, Path], fields_to_remove: List[str], output_file: Union[str, Path]) -> None
replace_fields_in_file(input_file: Union[str, Path], fields_to_replace: Dict[str, str], output_file: Union[str, Path]) -> None
remove_and_replace_fields_in_file(input_file: Union[str, Path], fields_to_remove: List[str], fields_to_replace: Dict[str, str], output_file: Union[str, Path]) -> None
remove_fields_from_dir(input_dir: Union[str, Path], fields_to_remove: List[str], output_dir: Union[str, Path]) -> None
replace_fields_in_dir(input_dir: Union[str, Path], fields_to_replace: Dict[str, str], output_dir: Union[str, Path]) -> None
remove_and_replace_fields_in_dir(input_dir: Union[str, Path], fields_to_remove: List[str], fields_to_replace: Dict[str, str], output_dir: Union[str, Path]) -> None
process_image(input_path: Path, output_path: Path, fields_to_remove: List[str], fields_to_replace: Dict[str, str]) -> None
process_directory(input_dir: Union[str, Path], output_dir: Union[str, Path], fields_to_remove: List[str], fields_to_replace: Dict[str, str]) -> None
For detailed parameter descriptions and return types, refer to the inline documentation or generated API docs.
Encountering issues? Follow these steps:
We welcome contributions from the community! To contribute:
Please adhere to our coding standards and include unit tests for new features.
MetaZap leverages these excellent open-source libraries:
We extend our gratitude to the developers of these projects for their invaluable contributions to the Python ecosystem.
MetaZap is licensed under the Apache License, Version 2.0 with important additional terms, including specific commercial use conditions. Users are strongly advised to read the full LICENSE file carefully before using, modifying, or distributing this work. The additional terms contain crucial information about liability, data collection, indemnification, and commercial usage requirements that may significantly affect your rights and obligations.
Keywords: MetaZap, image metadata, EXIF removal, privacy protection, Python library, batch processing, JPEG, PNG, HEIF, AVIF, JXL, image anonymization, metadata management, digital photography, image processing, data privacy, open-source tool, Pillow, piexif, image security
FAQs
A library for manipulating metadata in image files
We found that metazap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.