-
Notifications
You must be signed in to change notification settings - Fork 1
Corruption parameters
These parameters are the backbone of pngfucker and give it its signature look and effect.
Bitshift the image buffer to the right by this amount.
Negative amounts shift to the left!
| Original | -shift 1 |
-shift -8 |
-shift -3 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Shifting one bit leaves the image mangled-looking. |
Because the image was shifted 8 bits, the color channels have moved, turning the green to blue. |
#2: node pngfucker.js -input cioss.png -seed 0 -shift 1 -splits 0 -regions 0 -crunch 100
#3: node pngfucker.js -input cioss.png -seed 0 -shift -8 -splits 0 -regions 0 -crunch 100
#4: node pngfucker.js -input cioss.png -seed 0 -shift -3 -splits 0 -regions 0 -crunch 100
Creates corrupted "regions". This bitshifts the image buffer in a small area and swaps image bytes around.
This property has two sub-properties:
Minimum region size in height pixels.
Maximum region size in height pixels.
Positive values for rmin and rmax are how many Y lines the corruption should span for.
If you pass negative values, the property will be set to height / abs(rmin or rmax), where abs = the positive value of a number.
For example, a 1000x500 image with -rmin -5 and -rmax -2 means rmin = 500 / 5 = 100, and rmax = 500 / 2 = 250.
| Original |
-regions 3-rmin 5 -rmax 10+ -blackbg 1for visibility |
-regions 32-rmin 2 -rmax 12+ -blackbg 1for visibility |
-regions 4-rmin 10 -rmax 15+ -blackbg 1+ -crunch 60
|
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
#2: node pngfucker.js -input eathan.png -seed 1 -splits 0 -regions 3 -rmin 5 -rmax 10 -crunch 100 -blackbg 1
#3: node pngfucker.js -input eathan.png -seed 1 -splits 0 -regions 32 -rmin 2 -rmax 12 -crunch 100 -blackbg 1
#4: node pngfucker.js -input eathan.png -seed 1 -splits 0 -regions 4 -rmin 10 -rmax 15 -crunch 100 -blackbg 1 -crunch 60
A corruption effect where the image buffer is crunched and expanded, to give the effect of the image being sliced in half horizontally.
This simulates missing chunks and bits of a real corrupted image.
NOTE: This also performs a bitshift, but it doesn't reverse it afterwards, leaving the image glitched after a split.
This means that everything in your image will be glitched below the split line. This might be good or bad depending on what you want!
This property has two sub-properties:
Minimum split start area in height percentage.
Maximum split start area in height percentage.
| Original |
-splits 2+ -seed 2+ -crunch 50+ -blackbg 1
|
-splits 4+ -seed 7+ -crunch 60+ -blackbg 1
|
-splits 2-seed 2 -splitmin 50+ -crunch 60+ -blackbg 1
|
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
-splitmin 50 forcesimage splits to always appear at below 50% of the image height |
#2: node pngfucker.js -input eathan.png -seed 2 -splits 2 -regions 0 -crunch 50 -blackbg 1
#3: node pngfucker.js -input eathan.png -seed 7 -splits 4 -regions 0 -crunch 60 -blackbg 1
#4: node pngfucker.js -input eathan.png -seed 2 -splits 2 -regions 0 -crunch 50 -blackbg 1 -splitmin 50
-splitmin being used to only glitch the reflection side of an APNG:
| Original | Without -splitmin
|
-splitmin 60 |
|---|---|---|
![]() |
![]() |
![]() |
#2: node pngfucker.js -input apngtest.png -seed 2 -splits 2 -clamp 0 -regions 0 -crunch 50
#3: node pngfucker.js -input apngtest.png -seed 2 -splits 2 -clamp 0 -regions 0 -crunch 50 -splitmin 60
Animated -splits corruption example:
| Original | Splits |
|---|---|
![]() |
![]() |
node pngfucker.js -input cioss.png -frames 40 -fps 10 -breaks 55 -crunch 60 -seed 100 -splits 1 -regions 0 -shift 0 -div 1 -blackbg 1 -rmin -10 -rmax -8














