Commit graph

15 commits

Author SHA1 Message Date
bunnie
043dfd84ae update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
bunnie
9f141fe4cc strip trailing whitespace on gam 2024-01-15 00:00:00 +08:00
bunnie
dae43a51c5 format services/gam 2024-01-14 22:13:08 +08:00
nworbnhoj
d96faec4eb add png_decode comments 2022-08-09 06:18:49 +10:00
nworbnhoj
76bb796610 bugfix distortion in png_decode
png filter specification calls for initial prior_line = [0u8]
see: https://www.w3.org/TR/PNG/#9Filters
but [0u8] results in distortion ???????
so use [125u8]
2022-08-08 07:39:49 +10:00
nworbnhoj
155373bfa0 ignore png_decode chunk checksums
The checksum calc is inner-loop so removed for performance gain.

If a hacker can manipulate a byte then then they can manipulate a RGB
byte or a checksum byte - so the checksum doesn't really give any
protection from hacking afaik. I presume the checksum is in there to
detect corruption during storage or transmission - but if a couple of
bytes are corrupted you will not notice the change in the image - and
if a lot of bytes are corrupted then the distortion in the image will be
obvious. This is even more the case in Precursor, where we are shrinking
and dithering the image as a matter of course. So I don't really see the
point of the checkum
2022-08-08 05:47:45 +10:00
nworbnhoj
9b7c63c719 Box miniz_oxide InflateState 2022-07-29 06:13:20 +10:00
nworbnhoj
1923a9ccf4 Merge branch 'iter' of github.com:nworbnhoj/xous-core into iter 2022-07-28 06:26:16 +10:00
nworbnhoj
f95a49dfdc rename DecodePng INFLATED_BUFFER_LENGTH 2022-07-28 06:16:48 +10:00
nworbnhoj
afef00a028 breakout mod Img RGB raster 2022-07-28 06:06:16 +10:00
nworbnhoj
98586ffc6c breakout mod GreyScale adaptor iterator 2022-07-28 05:58:31 +10:00
nworbnhoj
2d0ddc3450 breakout mod Shrink adaptor iterator 2022-07-28 05:53:16 +10:00
nworbnhoj
64f6ddeade breakout mod Dither adaptor iterator 2022-07-28 05:51:07 +10:00
nworbnhoj
938788d72f breakout mod Dither adaptor iterator 2022-07-28 05:45:34 +10:00
nworbnhoj
7cd5ee82ce Implement decode_png adaptor iterator
This incomplete PNG decoder presents as an Iterator reading u8 bytes directly from a Reader.

Aproaching a png decoder as an Iterator requires significantly less Heap than
the traditional batch aproach.

On Precursor, this enables PNG bytes to be intercepted at the network interface
and processed into the much smaller gam::Bitmap format without ever having to
store the original PNG file.
2022-07-27 09:18:19 +10:00