Skip to content

anartisticengineer/GlitchFX3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glitch FX 3

The third installment of the glitch fx generator!

Setup

This project is intended for use with Python 3 (3.9+ recommended).
  1. Clone the repo, navigate to the project root folder
  2. Install the packages below. If using pip for example, you can install everything from the command line via:
  3. pip install -r requirements.txt
  4. The __main__.py script should be able to run now. Upon successfully starting up the GFX generator, you can follow the instructions below.

Packages

The following packages should be installed in order to run the generator (these can also be found in the requirements.txt file)
  • opencv-python
  • numpy
  • perlin_noise
  • pytest*
  • Pillow
  • pixelsort**
* for unit testing
** The pixelsort package is provided by the pixelsort repo by satyarth - more info on pixel sorting can be found on that repo ;)

Instructions

  1. Upon running the main script, a dialog box should pop up to select an image (so far, only jpg and png is supported)
  2. When an image is selected, the python prompt should show up in the console: Enter an effect (or x to exit):
  3. Enter an effect by sending an input of the form: effect_name/p_key p_value/p_key p_value... (More detail on the types of available effects can be found below)
  4. When finished, press the x key to exit view the final image. The image should pop up in a new window.
  5. If you wish to save the image, press the s key, and the dialog box will open for you to save the image. Press any other key otherwise if you don't want to save it. Either option will exit the program.

Effects Reference

When applying a new effect, the console input should be of the form: effect_name/p_key p_value/p_key p_value... where p_key p_value can be repeated for as many parameters available, or omitted altogether (will use the default values in that case)

Available parameters

Effect name Available parameters (p_key)
noisy p
scanlines or
scanner p, or
highpass p, k, a
warp type, f
wavy oct
burn p
pixelsort or, lower, upper, sortby

Expected values

p_key Meaning Expected value (p_value)
p Percent float: 0.0 - 1.0
or Orientation str: 'h' or 'v'
k Kernel Size int: odd number (k%2 = 1)
a Amplitude float: > 0.0
type Warp type str: {'rotateX', 'rotateY', 'shearX' or 'shearY'}
f Factor int or float (experiment a bit with this one)
oct Octaves int: >= 1
sortby Sorting Algorithm enum: [lightness, saturation, hue, minimum, intensity]
lower Lower Threshold float: 0.0 - 1.0 and < upper
upper Upper Threshold float: 0.0 - 1.0 and > lower

Examples

The following are examples you can try with the prompt in order to apply effects:
  • noisy will apply the noisy filter with the default values (percent of 0.1 in this case)
  • noisy/p 0.7 will apply the noisy filter with a percent value of 0.7
  • scanlines/or v will apply the scanlines filter with a vertical (v) orientation
  • warp/type shearY/f 5 will apply the warp filter with a type of shear Y and a factor of 5

Releases

No releases published

Packages

No packages published

Languages