Skip to content

friendlymatthew/png

Repository files navigation

png

This project aims to provide a PNG decoder backed by a feature-rich GPU-based renderer.

As a decoder, this project uses the PNG test suite to validate its ability to handle various PNG features and edge cases. Currently, png can decode and render images with an 8-bit color depth.

The renderer can resize images and trigger grayscaling when pressing G.

Usage

To render an image, run cargo run --release <image_path>. For example:

# cd png
cargo run --release ./obama.png

Additional Scripts

# Run the PNG test suite
cargo r --bin png-test-suite

# Profile the decoder
./profile.sh ./reagan.png

# Fuzz the decoder
./fuzz.sh

Reading

http://www.libpng.org/pub/png/pngintro.html
https://www.w3.org/TR/2003/REC-PNG-20031110/
http://www.libpng.org/pub/png/pngpic2.html
https://www.w3.org/Graphics/PNG/platform.html

https://sotrh.github.io/learn-wgpu/

About

PNG decoder and GPU-based renderer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages