JpegGlitcher.jl

Time to mess with Jpegs!
Author JuliaWTF
Popularity
7 Stars
Updated Last
4 Months Ago
Started In
November 2022

JpegGlitcher

It's glitching time!

JpegGlitcher only exports the glitch function. glitch takes an image, compresses it using the JPEG encoding, safely modifies some bytes of the compressed version and return the decoded version.

Here is a basic example, using the default parameters.

using JpegGlitcher
using RandomFileIO, TestImages

img = testimage("mountainstream")
glitch(img)

Glitched version of the Mountain View image

We can also make an animation, playing with the different parameters!

cat([glitch(img; rng = Random.Xoshiro(42), n = i, quality = 20) for i in 1:50]...; dims=3)

Low quality animated glitching

Glitch file

You can also directly glitch a file by loading FileIO.jl and ImageIO.jl.

using JpegGlitcher, FileIO, ImageIO

glitch("my_beautiful_img.png", "my_glitched_img.png")

The glitching will work on any image format supported by ImageIO.

Used By Packages