/pngfucker

A node script that glitches your images in a cool and original way

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

i rewrote this in .NET for faster speeds and better readability!

it's not perfect, but check out pngsmasher!
i might make a fully fledged GUI for it later, but for now it has a command-line tool nearly identical to pngfucker :)

pngfucker

pngfucker v1.3

What is this?

pngfucker is a tool that purposefully distorts and glitches images to create an unique effect that has never been implemented before.
It's very configurable and the output is randomized with each iteration, plus, now you can specify a numeric seed value!
pngfucker also has APNG support, and there's several examples of it after the documentation!

Quick story of how this was made

Have you ever gotten tired of seeing this generic JPEG glitch effect and wanted something else?
I was working on a program that controlled the game Garry's Mod from my phone in the browser, however, the colors looked off.
I tried to bitshift the view, and i got this peculiar glitching effect that looked cool (though i abandoned the controller project at that point because it was super slow) Later, i separated that effect into its own tool called "pngfucker", it stayed like that for 2 months, and then i added more features to it!

Setup

This project uses node.js, so you need it to run pngfucker!
pngfucker uses three NPM packages to do its magic:
buffershift
jimp
upng-js
Install them all with npm i before running pngfucker!

Usage

The script has its own commandline argument handler, although it doesn't like arguments with spaces.
All of the parameters below are optional. If no parameters are specified, it will convert an "input.png" into an "output.png" with the specified default values.
Generally, the trick to getting a good-looking corrupted image is to know how each of the options affects the image, and to experiment around a little until you get something that looks nice!

node pngfucker.js (args)

The complete list of args/parameters is in the wiki!

[epilepsy warning just in case, especially at the animated examples (11-20)]

Examples of Usage

I might remake these examples at some point, because pngfucker has changed so much that they aren't reproducible anymore, especially #1 to #10

#1: Original Image

"noooooo"'s profile picture from the Eathan's Realm Discord server

#2: -input input.png -regions 2 -shift -1 -crunch 40 -iquality 1 -splits 2 -div 1 -oquality 20 -contrast 0.4

xd

#3: Same as #2

e

#4: Same as #2, but -contrast 1

Looks like an SCP

#5: Same as #4

RGB?

#6: Same as #4

SCP with comically bad camera

#7: Same as #2

uhh

#8: #1 with -seed 2 -regions 2 -shift -1 -crunch 40 -iquality 1 -splits 2 -div 1 -oquality 20 -contrast 1

the

#10: Wobbuffet, -seed 4 -regions 2 -shift 0 -splits 2 -crunch 50 -clamp 1 -blackbg 1

burh

#11: Original Image #2

cube

#12: #11 with -seed 4 -regions 3 -shift 0 -splits 2 -div 1 -crunch 75 -clamp 1 -staticseed 0

glitchycube

#13: #12 with -staticseed 1

glitchycube

#14: #12 with -clamp 0 -staticseed 1

glitchyycube

#15: #12 with -clamp 0

glitchiercube

#16: Original Image #3

circley

#17: #16 with -seed 4 -regions 3 -shift 0 -splits 2 -div 1 -crunch 50 -clamp 1 -staticseed 0

angry circle

#18: #16 with -seed 4 -regions 4 -shift 0 -splits 3 -div 1 -crunch 50 -clamp 0 -staticseed 1

circle

#19: Original Image #4

balz

#20: #19 with -seed 4 -regions 3 -shift 0 -splits 2 -div 1 -crunch 70 -clamp 1 -staticseed 0 -mul 1.9

ballz

if pngfucker is cool for you pls star kthx
by andreweathan (if you're confused no that's not my real name