Awesome evo_django_kits created by maycuatroi
pip install evo-django-kits
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
Read the CONTRIBUTING.md file.
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.
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.
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
- Python 3.6+
- No external dependencies (only standard library modules)
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 analysis -
image.png_c2pa.json
- C2PA metadata analysis -
image.png_binary.json
- Binary pattern analysis -
image.png_combined.json
- Combined analysis
python analyze_png.py path/to/your/image.png -o output_directory
python analyze_png.py path/to/your/image.png -s
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
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
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.
============================================================
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
MIT