Awesome evo_django_kits created by maycuatroi
Project description
evo_django_kits
Awesome evo_django_kits created by maycuatroi
Install it from PyPI
pip install evo-django-kits
Usage
from evo_django_kits import BaseClass
from evo_django_kits import base_function
BaseClass().base_method()
base_function()
$ python -m evo_django_kits
#or
$ evo_django_kits
Development
Read the CONTRIBUTING.md file.
PNG Data Extractor
This repository contains tools to extract and analyze data from PNG files, with special focus on extracting C2PA (Content Authenticity Initiative) metadata that may be embedded in images generated by AI systems like ChatGPT.
Background
PNG files contain structured data in "chunks". In addition to standard PNG chunks, some AI-generated images contain C2PA metadata which provides provenance information. This metadata is often stored in text chunks (tEXt or iTXt) or in JUMBF (JPEG Universal Metadata Box Format) containers.
Tools Included
This repository includes several Python scripts for analyzing PNG files:
- png_data_extractor.py - Extracts standard PNG chunks and basic metadata
- c2pa_extractor.py - Focuses on extracting C2PA/CAI specific metadata
- extract_binary_data.py - Analyzes binary patterns looking for JUMBF boxes and signature patterns
- analyze_png.py - Combined tool that uses all three approaches
Requirements
- Python 3.6+
- No external dependencies (only standard library modules)
Usage
Analyze a PNG file with all tools at once:
python analyze_png.py path/to/your/image.png
This will generate several JSON files with analysis results:
image.png_analysis.json- Standard PNG chunk analysisimage.png_c2pa.json- C2PA metadata analysisimage.png_binary.json- Binary pattern analysisimage.png_combined.json- Combined analysis
Save output to a specific directory:
python analyze_png.py path/to/your/image.png -o output_directory
Print only a summary without saving files:
python analyze_png.py path/to/your/image.png -s
Using individual tools:
You can also use each tool separately:
python png_data_extractor.py path/to/your/image.png
python c2pa_extractor.py path/to/your/image.png
python extract_binary_data.py path/to/your/image.png
What Data Is Extracted
These tools extract:
-
Standard PNG Information
- All PNG chunks with their types, lengths, and data
- Basic image information (dimensions, color type, bit depth)
- Contents of text chunks
-
C2PA/CAI Metadata
- Claim generators and assertions
- AI model information
- Digital source type
- URNs and other identifier information
- Signature data
-
Binary Analysis
- JUMBF box structures
- Content provenance signatures
- ASCII strings related to C2PA/CAI
Example Output
The summary output looks like:
============================================================
PNG ANALYSIS SUMMARY FOR: example.png
============================================================
File size: 12345 bytes
PNG Chunks: 8
- IHDR: 1
- tEXt: 2
- iTXt: 1
- IDAT: 3
- IEND: 1
C2PA Data:
- C2PA metadata entries: 3
- Claims found: 1
- Assertions found: 2
- AI Generated: Yes
- AI Model: ChatGPT
Binary Analysis:
- JUMBF boxes found: 5
- C2PA signatures found: 3
- Relevant strings found: 12
============================================================
For detailed information, check the generated JSON files.
============================================================
Understanding the Results
For detailed analysis, check the generated JSON files which contain all extracted information. The C2PA/CAI metadata can help verify:
- If an image was generated by AI
- Which AI model generated it
- When it was created
- Other provenance and authenticity information
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evo_django_kits-0.1.2.tar.gz.
File metadata
- Download URL: evo_django_kits-0.1.2.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8b40221510323860e690e91f136f15357f6afb179c386491d835f4d2ec8de71
|
|
| MD5 |
2a787f08d72e5e9b7d5d86f99ebe097c
|
|
| BLAKE2b-256 |
af40a3f1dec829adbc82058334432a403bc595c5f475a3f3fcb6daba66cc7d38
|
File details
Details for the file evo_django_kits-0.1.2-py3-none-any.whl.
File metadata
- Download URL: evo_django_kits-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f08419405bcc9e081155a0fa1346a98d8a3d2147c54434a0558d0c4af66cbbe2
|
|
| MD5 |
e54c8610b0d547b4fe42b33d62df9652
|
|
| BLAKE2b-256 |
a5427244b03779e0eaafcba6c486569fda626a813522fe1963c4634b9f147994
|