Skip to content

Interactively edit individual DCT blocks in any JPEG image in the browser.

License

Notifications You must be signed in to change notification settings

OmarShehata/jpeg-sandbox

Repository files navigation

JPEG Sandbox

This is a very barebones editor that supports clicking on any pixel in a JPEG image to see the 64 DCT coefficients that make up that 8x8 block. Each individual coefficient can be edited through text. You can also use the slider to zero out coefficients one by one starting with the lowest absolute value (which is what you'd do during compression) or reverse that to see what it would look like to throw away the most important coefficients first.

jpeg-sandbox

It also visualizes the coefficients that make up each individual block in order of their weight.

jpeg-sandbox2

I created this to help with explaining how JPEG works for a talk at CodeBar 2022.

Cat picture by Mikhail Vasilyev. Also inspired by the visualization in https://www.jezzamon.com/fourier/.

See also my Unraveling the JPEG article.

Local setup

Run yarn to install dependencies and yarn dev to run. Run the app on localhost:3000.

About

Interactively edit individual DCT blocks in any JPEG image in the browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages