3 Commits

Author SHA1 Message Date
e31aa5decb Move main.rs to a test, drop dep on png crate
The codec library doesn't use any external dependencies. The PNG crate
is only to load some source material for testing the codec. Turning the
test driver into a real test lets me turn the PNG dependency into a
dev-dependency.
2025-10-12 21:18:32 -05:00
ef5d962621 Add PNG write-out machinery
I've pulled in the PNG crate to write the images back out as regular
PNG images. Now I can compare the results of my decoder against the
reference images.

I also made a weird utility iterator thing to wrap the Decoder's pixel
iterator because the PNG crate wants a &[u8], not a bunch of u32's or
custom pixels structs. I should learn how to impl the right traits so
that I can just `.to_components()` on an Iterator<Item=PixelRGBA>
instead of the wrapper constructor thing I have now.
2024-10-14 21:07:30 -05:00
3a35dc3a20 Iterators are melting my brain 2024-10-14 21:07:29 -05:00