Skip to main content

Library that provides pixelation for image redaction

Project description

pixelate-redactor

Redact images with pixels

Works with Python >= 2.6, Python >= 3.2.

Installation

pip install pixelate-redactor

Example

pixelate-redactor

pixelate-redactor \
  --input=img/example_img_original.png \
  --output=img/example_img_redacted.png \
  --pixel-size=10 \
  --start-x=90 \
  --start-y=180 \
  --size-x=150 \
  --size-y=150

pixelate-redactor-boxes

pixelate-redactor \
  --input=img/example_img_original.png \
  --output=img/example_img_redacted.png \
  --pixel-size=10 \
  --boxes=img/boxes.json

with img/boxes.json:

{
  "__box_name_1__": {
    "px": 90,
    "py": 180,
    "sx": 150,
    "sy": 150
  },
  "__box_name_2__": {
    "px": 90,
    "py": 180,
    "sx": 150,
    "sy": 150
  }
}

(the values are the same, to keep the same result from the single box example)

  • px -> Position X
  • py -> Position Y
  • sx -> Size X
  • sy -> Size Y

Results

From this:

original

To this:

redacted

Project details


Download files

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

Files for pixelate-redactor, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size pixelate_redactor-0.4-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pixelate-redactor-0.4.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page