Skip to main content

Awesome evo_django_kits created by maycuatroi

Project description

evo_django_kits

CI PyPI version PyPI - Downloads PyPI - Python Version PyPI - License GitHub issues

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:

  1. png_data_extractor.py - Extracts standard PNG chunks and basic metadata
  2. c2pa_extractor.py - Focuses on extracting C2PA/CAI specific metadata
  3. extract_binary_data.py - Analyzes binary patterns looking for JUMBF boxes and signature patterns
  4. 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 analysis
  • image.png_c2pa.json - C2PA metadata analysis
  • image.png_binary.json - Binary pattern analysis
  • image.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:

  1. Standard PNG Information

    • All PNG chunks with their types, lengths, and data
    • Basic image information (dimensions, color type, bit depth)
    • Contents of text chunks
  2. C2PA/CAI Metadata

    • Claim generators and assertions
    • AI model information
    • Digital source type
    • URNs and other identifier information
    • Signature data
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evo_django_kits-0.1.2.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evo_django_kits-0.1.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

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

Hashes for evo_django_kits-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f8b40221510323860e690e91f136f15357f6afb179c386491d835f4d2ec8de71
MD5 2a787f08d72e5e9b7d5d86f99ebe097c
BLAKE2b-256 af40a3f1dec829adbc82058334432a403bc595c5f475a3f3fcb6daba66cc7d38

See more details on using hashes here.

File details

Details for the file evo_django_kits-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for evo_django_kits-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f08419405bcc9e081155a0fa1346a98d8a3d2147c54434a0558d0c4af66cbbe2
MD5 e54c8610b0d547b4fe42b33d62df9652
BLAKE2b-256 a5427244b03779e0eaafcba6c486569fda626a813522fe1963c4634b9f147994

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page