Code Monkey home page Code Monkey logo

image-corruptor's Introduction


This is a simple image corruptor that utilizes ImageMagick and FFmpeg.

Latest Changelog

  • Added proper OpenBSD support
  • Added support for non-gnu OSes

How 2 use dis?

  1. Install the self explanatory dependencies
  2. Run the script with sh corruptor.sh on Android or ./corruptor.sh on other platforms

The only dependencies are FFmpeg, ImageMagick and POSIX commands such as head, tail and sed

Built-in help message
"image-corruptor" is a simple POSIX Shell script for adding glitch effects to images e.g. corrupting them.
The corruption process utilizes ImageMagick, FFmpeg and Coreutils.

Options:

 VAR     SWITCH    FUNCTION
 input   (-i=)     - Input file
 output  (-o=)     - Output file
 filter  (-f=)     - FFmpeg audio filter (see ffmpeg.org/ffmpeg-filters.html)
 complex (-c=)     - Complex FFmpeg audio input
 format  (-a=)     - Intermediate audio format (see "ffmpeg -formats")
 rate    (-r=)     - Intermediate audio rate
 imargs  (-m=)     - Additional ImageMagick arguments
 src     (-s=)     - File with predefined variables
 debug   (--debug) - Enable simple debug info
 lavfi   (--lavfi) - Use lavfi complex input format
 alpha   (--alpha) - Enable alpha channel
 nolim   (--nolim) - Use an older image restoration alghorhithm

To test if everything works you can do
 $ convert -size 300x300 gradient:white-gray -rotate 45 /tmp/some.png
 $ ./corruptor.sh -i=/tmp/some.png -f=earwax,aecho -o=output.png
You should get a corrupted, stripey image from this.

The simplest way to corrupt an image with this script would be ./corruptor.sh -i=input.png -f=lowpass

If no output file is specified, the name will be generated automatically.

Technical

Tested OSes
  • Android
  • MacOS
  • Haiku OS
  • FreeBSD
  • OpenBSD
  • Linux (Arch, NixOS, Alpine, Fedora)
UNtested (but probably working) OSes
  • NetBSD
  • MirBSD
  • Windows (With Cygwin or MSYS)

Corrupted Images

custom "acrusher=bits=16:samples=12"

custom "acrusher=bits=16:samples=200:mix=0.1"

TODO

  • More testing, some features break the output images.
  • Fix mtrkss/video-corruptor

image-corruptor's People

Contributors

mtrkss avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.