-
Notifications
You must be signed in to change notification settings - Fork 0
Cool effect parameters
These properties control effects applied before the actual corruption effects.
These usually make the image prettier!
percent -crunch
, bool -/+bg
, and int -div
are especially useful.
Image contrast applied before corruption. 0 is neutral (no change), -1 is the lowest contrast, 1 is the highest.
Original | No contrast | -contrast 0.5 |
-contrast -0.5 |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
#2: pngsmasher.cli -input eathan.png -frames 20 -fps 10 -crunch 60 -seed 50 -splits 1 -div 1 +bg -rmin -10 -rmax -8
#3: node pngfucker.js -input eathan.png -frames 20 -fps 10 -crunch 60 -seed 50 -splits 1 -div 1 +bg -rmin -10 -rmax -8 -contrast 0.5
#4: node pngfucker.js -input eathan.png -frames 20 -fps 10 -crunch 60 -seed 50 -splits 1 -div 1 +bg -rmin -10 -rmax -8 -contrast -0.5
Multiplies output image size by this value.
Divides output image size by this value.
This is often useful, because corruption on large, detail-filled images often looks bad.
-div
and -crunch
is a good combination to make corruption look better!
Note that both -mul and -div are applied! You can use them like a fraction. -mul 3 -div 4
resizes the image to ¾ of its original size!
Resizes image to this percentage in pre-processing, and resizes them back to normal in post-processing, to "crunch" the pixels.
This gives a nice, pixel-like effect to the glitching, and it mostly works well with small low-detail images (256x256, 512x512, you get the idea)
This parameter is a good alternative to -div, because you won't have to resize it back to normal size afterwards.
Resizing and crunching uses nearest-neighbor interpolation, so you can enjoy crispy glitching.
This parameter has an alternative out of two parameters:
Setting both crwidth
and -crheight
will ignore -crunch
. The image will be crunched to those two values and back to normal, instead of a percentage!
Original non-corrupted |
-crunch 100 (has no effect) |
-crunch 50 |
-crunch 15 |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
#2: pngsmasher.cli -input eathan.png -seed 2 -splits 1 -splitmin 50 +bg -regions 3 -crunch 100
#3: pngsmasher.cli -input eathan.png -seed 2 -splits 1 -splitmin 50 +bg -regions 3 -crunch 50
#4: pngsmasher.cli -input eathan.png -seed 2 -splits 1 -splitmin 50 +bg -regions 3 -rmin 2 -rmax 5 -crunch 15
Normally, due to the way pngfucker corrupts images, alpha bits get mangled with RGB bits, causing changes in transparency for some pixels.
Usually, it looks way too "bright" on a white background, so +bg
underlays a background behind the image, increasing the contrast of the image in the process and giving the corruption a nice rough effect.
You can control +bg
's background color with three extra parameters, which all default to 0 (black):
There's also a fourth parameter that makes it so the background doesn't appear under nearly transparent pixels:
This helps avoid flashing imagery in transparent APNGs, and overall helps! By default, this is on, and it should only be disabled for very specific purposes.
Original | Without +bg
|
+bg |
---|---|---|
![]() |
![]() |
![]() |
NOTE: If you're viewing this with a dark theme (or anything that makes the page dark), you might not see the difference easily
#2: pngsmasher.cli -input eathan.png -seed 2 -splits 1 -splitmin 50 -crunch 50
#3: pngsmasher.cli -input eathan.png -seed 2 -splits 1 -splitmin 50 -crunch 50 +bg
This enables my own attempt at making an NTSC filter! This blurs the image horizontally and gives it a fringe (alternating pixel row shifts to the left and right) I can't add examples right now, but check the README for NTSC examples at the bottom! This has 3 sub-parameters:
Controls how far the fringe drifts. If you modify the code, you can change the direction, but by default this goes to the right only.
This sets how many samples are used for the NTSC blurring effect (horizontal pixels). The power lowers exponentially with each new sample. The higher this number, the wider the blur streaks go.
This controls the blur power. (how strong the blur color is) For weaker blur coloring, set this to around 0.5, and for smudgier blurs, set to 2-3. Setting this to zero will turn the image black (division by zero) so don't do that lol
Enables a fancy "grayscale chroma abberation" effect that i created by accident while working on the NTSC filter. This also has the effect of blurring horizontally, just like the NTSC filter! You can control it with three sub-parameters:
Identical to -xblur
in functionality
Identical to -xblurpower
in functionality
This controls how far apart the red and blue chroma abberation channels go "out of tune" on the image. Usually, a value of 1 works well enough.
-clamp
is broken for now, not sure what causes it to break
i haven't tested enough, but i think it only breaks when -mul
, -div
and/or -crunch
are used
This "localises" the corruption on a transparent image/APNG, ignoring corruption outside the "main area" of the image (unless its pixel delta is >64)
Without it, corruption affects the whole image. See the examples below for more information!
Epilepsy warning, flashy example
Original | Without +clamp
|
+clamp |
---|---|---|
#2: pngsmasher.cli -input cube.png -seed 0
#3: pngsmasher.cli -input cube.png -seed 0 +clamp