Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from image-rs:master #7

Open
wants to merge 618 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
618 commits
Select commit Hold shift + click to select a range
1bbe055
Merge pull request #369 from fintelia/fix-warnings
HeroicKatora Dec 24, 2022
8244d64
Use iterators in Up and Avg filtering
okaneco Dec 24, 2022
d60f7d1
Convert Up and Avg filters to use chunks_exact
okaneco Dec 25, 2022
40c0b88
Remove unnecessary cast
okaneco Dec 25, 2022
1b83875
Merge pull request #371 from okaneco/up-avg
fintelia Dec 25, 2022
676c1ec
Use tuples instead of manually slicing input bytes
Shnatsel Dec 25, 2022
3f8e1e6
Also randomize the color type (somewhat)
Shnatsel Dec 25, 2022
0359437
Add comment explaining uncompressed encoding case
fintelia Dec 25, 2022
80f674f
Merge pull request #364 from fintelia/fdeflate2
fintelia Dec 25, 2022
f0ef6fd
Faster decoding of fdeflate encoded PNGs
fintelia Dec 25, 2022
1144b3d
Add comment explaining fdeflate fallback
fintelia Dec 31, 2022
0eeb3ec
Optimize adaptive filtering
fintelia Dec 31, 2022
e624a59
Merge pull request #375 from fintelia/adative-filtering
HeroicKatora Dec 31, 2022
f1f403f
Drop unnecessary scope
Shnatsel Dec 31, 2022
28035fd
Merge pull request #370 from Shnatsel/roundtrip-fuzz
HeroicKatora Jan 1, 2023
b5babf3
Also roundtrip with various bit depths
Shnatsel Jan 1, 2023
04d55cc
Improve comment
Shnatsel Jan 2, 2023
f7ad673
Use separate algorithms for Paeth filtering and unfiltering
okaneco Jan 5, 2023
295130d
Rewrite Paeth unfilter to use a simple loop instead of chunks
okaneco Jan 5, 2023
7d04d35
Merge pull request #378 from okaneco/paeth-decode
HeroicKatora Jan 7, 2023
32fd869
Merge pull request #376 from Shnatsel/roundtrip-fuzz-2
fintelia Jan 14, 2023
d0b3d50
Simplify arithmetic in Paeth decode filter
okaneco Jan 12, 2023
cdecd2c
Fix remaining clippy lints in lib
okaneco Jan 12, 2023
56e3ea6
Merge pull request #380 from okaneco/decode-and-clippy
fintelia Jan 14, 2023
d845db5
Add support for palette in fuzz
Jan 15, 2023
ae781bf
Implement fuzzing for palette
Jan 18, 2023
59f1b3c
Optimize Avg encoding filter with bitwise operation
okaneco Jan 18, 2023
9f8c1e5
Use SWAR in Sub decoding
okaneco Jan 18, 2023
ab8b501
Use SWAR for Avg decoding
okaneco Jan 18, 2023
ffdbbd7
Reorder match arms for BytesPerPixel in Avg unfilter
okaneco Jan 20, 2023
00d3438
Remove `require_length` from `unfilter`, no longer return Result
okaneco Jan 20, 2023
090f471
Unroll chunks exact for Avg and revert to obvious average, remove swa…
okaneco Jan 20, 2023
3292fd6
Unroll chunks_exact in Sub
okaneco Jan 20, 2023
e0af71f
Optimize Paeth decoding with chunks_exact by element
okaneco Jan 20, 2023
77c31c6
Remove assertions from unfiltering
okaneco Jan 20, 2023
7d6fa6b
Add comments summarizing this PR
okaneco Jan 21, 2023
f295c11
Merge pull request #382 from okaneco/swar
HeroicKatora Jan 22, 2023
2617752
Reuse some buffers and apply clippy fixes
CryZe Nov 9, 2022
90aafac
Add comment explaining buffer reuse
CryZe Nov 9, 2022
6862566
Merge pull request #360 from CryZe/reuse-bufs-and-clippy
fintelia Jan 30, 2023
bc846c6
Improve corpus-bench
fintelia Dec 25, 2022
257598a
Have corpus-bench take speed and filter method as arguments
fintelia Dec 25, 2022
a46450c
Downgrade to clap 3.0 to retain MSRV
fintelia Feb 4, 2023
b1cceaa
Merge pull request #372 from fintelia/better-corpus-bench
fintelia Feb 7, 2023
43646cb
Merge pull request #373 from fintelia/finflate3
fintelia Feb 9, 2023
7cbf35f
Merge pull request #381 from ogarokpeter/master
fintelia Feb 15, 2023
d22ee72
Add option to ignore Adler32 checksum in ZlibStream
okaneco Mar 2, 2023
3915b69
Update miniz_oxide to 0.7.1, enable `simd` feature
okaneco Mar 3, 2023
8b71c54
Add ignore_crc flag to DecodeOptions
okaneco Mar 3, 2023
7e209b9
Some refactoring
fintelia Mar 5, 2023
97a53e2
next_raw_interlaced_row shouldn't return an option
fintelia Mar 5, 2023
b65dfa5
Remove unused error variant
fintelia Mar 6, 2023
15c0a07
More refactoring
fintelia Mar 6, 2023
784594e
More refactoring
fintelia Mar 6, 2023
825d1ab
Remove Reader::new
fintelia Mar 6, 2023
a702e5c
More refactoring
fintelia Mar 6, 2023
6f57822
Remove get_info macro
fintelia Mar 6, 2023
92b55e8
Remove unused function
okaneco Mar 9, 2023
08882f7
Slightly simpler error logic
fintelia Mar 12, 2023
73ff6c9
Merge pull request #389 from fintelia/cleanup2
HeroicKatora Mar 12, 2023
6b9ad55
Returning references to self creates borrow check headaches
fintelia Mar 6, 2023
d314c8d
Do all transformations at once
fintelia Mar 6, 2023
5d453e6
More refactoring
fintelia Mar 6, 2023
290a015
Merge pull request #386 from okaneco/adler32
fintelia Mar 13, 2023
211876c
More code cleanup
fintelia Mar 13, 2023
8f71cc0
Faster decompression of non-fdeflate encoded PNGs
fintelia Mar 17, 2023
982a3ea
Merge pull request #384 from fintelia/fdeflate-full
fintelia Mar 18, 2023
a2356f5
Release 0.17.8-rc
fintelia Mar 18, 2023
2f53fc4
Merge pull request #391 from fintelia/0.17.8-rc
fintelia Mar 21, 2023
ad7e2d9
Release 0.17.8
fintelia Apr 3, 2023
fddc1f7
Merge pull request #394 from fintelia/release-0.17.8
fintelia Apr 11, 2023
9bb5641
Add rust-version to Cargo.toml
udoprog Apr 13, 2023
c6038fa
Merge pull request #397 from udoprog/patch-1
HeroicKatora Apr 13, 2023
96d18e9
Improve unfilter Sub 1bpp
zlstringham Apr 19, 2023
ee5cfa2
Improve unfilter Sub 2bpp
zlstringham Apr 19, 2023
74fc29b
Improve Up unfilter
zlstringham Apr 19, 2023
b7913a7
Merge pull request #398 from zlstringham/improve-unfilter
HeroicKatora Apr 19, 2023
4c5b053
Fix ICC profile not completely decompressed
sophie-h Apr 20, 2023
4579a7c
Merge pull request #399 from sophie-h/wip/sophie-h/fix-iccp-decompress
fintelia Apr 24, 2023
5795162
Release 0.17.9
fintelia May 29, 2023
1591a6a
Merge pull request #401 from fintelia/release-0.17.9
fintelia Jun 10, 2023
32d8a10
Clearer name and documentation for
fintelia Jun 10, 2023
5d92783
Merge pull request #396 from fintelia/cleanup3
fintelia Jun 11, 2023
b8f62af
Add alpha transformation
daxpedda Jun 11, 2023
e7eb2bc
Address review
daxpedda Jun 11, 2023
0424a38
Fix CI
daxpedda Jun 11, 2023
0ea4efb
Address review
daxpedda Jun 11, 2023
869b4e0
Merge pull request #395 from daxpedda/alpha-transformation
fintelia Jun 11, 2023
1709d9e
Add CIFuzz GitHub action
DavidKorczynski Nov 23, 2022
50c4527
Merge pull request #365 from DavidKorczynski/cifuzz-int2
fintelia Jul 11, 2023
4bb9b6d
fmt (manually)
Fight-For-Food Jul 18, 2023
3b3f2e3
Merge pull request #403 from Fight-For-Food/ppu
fintelia Jul 18, 2023
eaaafcc
Put Crc update behind ignore_crc flag in StreamingDecoder::next_state
okaneco Aug 11, 2023
1fd23f5
Merge pull request #407 from okaneco/crc-clean
fintelia Aug 12, 2023
91cf0c8
Release 0.17.10
fintelia Aug 12, 2023
e113d76
Merge pull request #408 from fintelia/release-0.17.10
fintelia Aug 18, 2023
10712a3
Use Cargo.lock.msrv in CI
fintelia Aug 18, 2023
7642f0f
Merge pull request #409 from fintelia/fix-msrv-ci
fintelia Aug 18, 2023
4b2a01f
Refactor unpack_bits for palette expanded images
okaneco Aug 8, 2023
6ac0de4
Address review comments
okaneco Aug 18, 2023
4068689
Add assert in unpack_bits for input buffer
okaneco Aug 19, 2023
ae5dee9
Merge pull request #405 from okaneco/unpack-bits
fintelia Aug 27, 2023
e4b4811
Ignore subsequent iCCP chunks to match `libpng` behavior.
anforowicz Aug 31, 2023
cbea7ff
Merge pull request #410 from anforowicz/fix-handling-of-duplicate-icc…
fintelia Sep 1, 2023
71db7e9
Remove code that sets detect_odr_violation=0
whtsht Sep 5, 2023
6bcc80a
Fix mismatched types
whtsht Sep 5, 2023
bf2c26b
Scaffolding for direct benchmarking of `crate::filter::unfilter`.
anforowicz Sep 21, 2023
324d117
cargo fmt
anforowicz Sep 21, 2023
452ae89
Renaming `for_prediction` into `from_usize`
anforowicz Sep 22, 2023
e11786e
Merge pull request #413 from anforowicz/unfilter-benchmarks
fintelia Sep 23, 2023
b6a4f59
Merge branch 'image-rs:master' into master
whtsht Sep 24, 2023
f10238a
Merge pull request #412 from whtsht/master
fintelia Sep 24, 2023
abbbd19
Write document of `StreamWriter::finish`
H1rono Oct 27, 2023
baea055
Merge pull request #419 from H1rono/doc-stream-writer-finish
fintelia Oct 30, 2023
1825c7e
Using `std::simd` to speed-up `unfilter` for `Paeth` for bpp=3 and bp…
anforowicz Nov 2, 2023
f872736
Switch from mips to powerpc for cross target (#423)
fintelia Nov 4, 2023
310edea
Reduce copying and allocations (#422)
fintelia Nov 9, 2023
ec2d257
Extra benchmark inputs: non-compressed, non-filtered data. (#420)
anforowicz Nov 9, 2023
e8b6482
Renaming s/U32Value/U32ValueKind/ and other related, small refactorings.
anforowicz Oct 5, 2023
93b7ffa
Handle fdAT sequence numbers via U32 state.
anforowicz Oct 5, 2023
c65cb64
Pass image data directly to `ZlibStream`, bypassing `ChunkState::raw_…
anforowicz Oct 5, 2023
f4bc666
Move `benches/png_generator.rs` to `src/test_utils.rs`.
anforowicz Nov 14, 2023
a568f6c
Fix handling of fdAT chunks shorter than 4 bytes.
anforowicz Nov 14, 2023
e75843f
Testing sequence number of APNG frame split across 2 fdAT chunks.
anforowicz Nov 14, 2023
94ef816
Merge pull request #424 from anforowicz/idat-straight-to-zlibstream
fintelia Nov 14, 2023
8afa7ef
Upgrade fdeflate and remove ZlibStream::in_buffer (#425)
fintelia Nov 16, 2023
b93777c
Option to ignore ancillary chunks with invalid CRC (#430)
sophie-h Nov 26, 2023
f80dfe9
Optimize compaction of Reader::data_stream (#426)
fintelia Nov 26, 2023
3ef96ec
Clippy fixes (#433)
fintelia Dec 2, 2023
acab1e6
new_with_info construtor for encoder (#434)
DeniseBryson Dec 2, 2023
7f70ffa
Regression test for invalid CRC ancillary chunks (#435)
sophie-h Dec 5, 2023
3f563bb
Test failing image for skip_ancillary_crc disabled (#436)
sophie-h Dec 5, 2023
badce2a
Update `unstable` portable-simd imports (#437)
okaneco Dec 11, 2023
dbe2cc6
Faster u32 parsing (#428)
anforowicz Dec 16, 2023
51fd35b
Benchmark varying sizes of IDATs and larger generated images (#432)
fintelia Dec 17, 2023
8a499d9
No more hard-coded limits (#441)
fintelia Dec 17, 2023
d761f16
Validate provided info in Encoder::with_info (#442)
fintelia Dec 25, 2023
c4121b5
Cap buffer sizes via `ZlibStream::set_max_total_output`. (#429)
anforowicz Jan 3, 2024
1636b55
Avoid 32kB decompression lag + compact less often. (#447)
anforowicz Jan 6, 2024
254e9b2
Reject zero sized images (#445)
fintelia Jan 6, 2024
b00fb53
Use fdeflate::decompress_to_vec_bounded for ICC profile (#449)
fintelia Jan 7, 2024
c33e3fb
Adds `Reader::finish` to read all the auxillary chunks that comes aft…
jupyterkat Jan 12, 2024
9c97a56
Immediately reject IDAT before IHDR (#456)
fintelia Jan 13, 2024
f1e7fa0
Ignore trailing date in the IDAT stream (#454)
fintelia Jan 13, 2024
5ac3b41
Release 0.17.11 (#455)
fintelia Jan 13, 2024
c145797
Reject zero-sized frame (#457)
fintelia Jan 20, 2024
ed54082
End-to-end decoding benchmarks of paletted PNG images. (#453)
anforowicz Jan 20, 2024
7318440
Run CI for more branches (#459)
fintelia Jan 20, 2024
22e7688
Refactoring: Moving row transformation functions into a separate module.
anforowicz Jan 12, 2024
8e24951
Hoist error handling from `expand_palette` into `mod.rs`.
anforowicz Jan 12, 2024
64970c6
Expose consistent API from all `transform.rs` functions.
anforowicz Jan 12, 2024
2c65362
Memoize which row transformation function should be used.
anforowicz Jan 12, 2024
6cad99d
Add unit tests and benchmarks for `expand_paletted`.
anforowicz Jan 13, 2024
211833f
Remove remaining uses of miniz_oxide for decoding
fintelia Jan 29, 2024
2bd3dc9
Import BoundedDecompressionError
fintelia Jan 29, 2024
bbce63d
Extract a separate `palette.rs` module.
anforowicz Jan 29, 2024
d9df1d7
Fix constants used in palette benchmarks.
anforowicz Jan 29, 2024
b0cc095
Change `TransformFn` to allow memoization in the future
anforowicz Jan 29, 2024
a585814
Memoize combined PLTE+trNS lookup table.
anforowicz Jan 29, 2024
72aecc3
Copy 4 bytes at a time when expanding palette into rgb8.
anforowicz Jan 29, 2024
b13388f
Copy 4 bytes at a time in `create_rgba_palette`
anforowicz Jan 29, 2024
92540b3
Merge pull request #463 from fintelia/less-miniz-oxide
kornelski Feb 3, 2024
a6425ca
Return Info with static lifetime (#465)
fintelia Feb 4, 2024
ec8dbe9
Test minimal versions in CI (#467)
fintelia Feb 11, 2024
59e04df
Release 0.17.12 (#468)
fintelia Feb 16, 2024
c02bd7b
Fix Send bound on Reader (#471)
fintelia Feb 18, 2024
b5b0d48
Release 0.17.13 (#472)
fintelia Feb 19, 2024
9dd2a89
Add an option to ignore iccp chunk (#477)
sssooonnnggg Apr 1, 2024
f28bc07
Ignore iCCP section if it is invalid (#475)
nathaniel-daniel Apr 1, 2024
f00ca20
Fix test and warnings (#480)
fintelia Apr 1, 2024
1864796
ci: Update to `actions/checkout@v4` from `v2`
waywardmonkeys Jun 28, 2024
9517a52
Merge pull request #483 from waywardmonkeys/update-ci
kornelski Jun 28, 2024
3308238
Remove usages of `extern crate`
waywardmonkeys Jun 29, 2024
edc3269
Merge pull request #484 from waywardmonkeys/remove-extern-crate-usages
kornelski Jun 29, 2024
49f0cad
Fix `clippy::legacy_numeric_constants` lints
waywardmonkeys Jun 29, 2024
d4390c4
Fix typos.
waywardmonkeys Jun 29, 2024
2cfde02
README: Remove broken badges
waywardmonkeys Jun 29, 2024
fc3389b
Use SIMD for Paeth unfiltering bpp=4, bpp=8
okaneco Aug 12, 2024
4d5a4b1
Merge pull request #492 from okaneco/simd_paeth_u8
HeroicKatora Aug 15, 2024
e38e7e1
Update miniz_oxide to 0.8.0.
khuey Aug 24, 2024
1ed48eb
Merge pull request #494 from khuey/miniz_oxide_0_8
HeroicKatora Aug 25, 2024
a860652
Introduce a separate `struct Adam7Info`.
anforowicz Aug 30, 2024
82547fc
Passing `&Adam7Info` to `fn expand_pass`.
anforowicz Aug 29, 2024
fa12d37
Passing `&Adam7Info` to `fn expand_adam7_bits`.
anforowicz Aug 29, 2024
d19fa09
Independent `row_stride_in_bytes` in `expand_adam7_bits`.
anforowicz Aug 29, 2024
83c89cd
New public API: `pub fn expand_interlaced_row`.
anforowicz Aug 28, 2024
ac04cd3
Fix `cargo doc` warnings
anforowicz Aug 30, 2024
ddb54b2
Add usage example to the doc comment of `fn expand_interlaced_row`.
anforowicz Aug 30, 2024
7dae687
Merge pull request #495 from anforowicz/public-expand-interlaced-row-api
HeroicKatora Sep 9, 2024
eebd5b2
Extract a separate `interlace_info.rs` module.
anforowicz Sep 8, 2024
1bc6084
Remove unused `BufRead` constraint from `buf_independent.rs`
anforowicz Sep 5, 2024
b4c5f1a
When fuzzing treat most errors as equivalent
anforowicz Sep 5, 2024
b5b0674
Support for detecting an unexpected EOF using the public API.
anforowicz Sep 8, 2024
5efbb60
Support for resuming decoding after `UnexpectedEof`.
anforowicz Sep 4, 2024
2a07262
Fuzz a vector of type-erased decoder implementations.
anforowicz Sep 12, 2024
ee9cf88
Add `IntermittentEofs` fuzzer coverage.
anforowicz Sep 13, 2024
d1027ab
Merge pull request #496 from anforowicz/public-incomplete-input-error
fintelia Sep 17, 2024
b042f74
Fix resuming `next_frame` after `UnexpectedEof` (APNG trouble).
anforowicz Sep 19, 2024
c529436
Avoid infinite loops in `buf_independent` fuzzer after real EOF.
anforowicz Sep 19, 2024
589a45e
Use `Cell<bool>` instead of `RefCell<bool>` in the `buf_independent` …
anforowicz Sep 19, 2024
ab0e86c
Restore using `NoMoreImageData` errors.
anforowicz Sep 20, 2024
3bc310d
Treat `UnexpectedEof` under `parse_chunk` as a `FormatError`.
anforowicz Sep 23, 2024
59043bd
Idempotent handling of missing `fdAT` chunk in a truncated PNG file.
anforowicz Sep 23, 2024
16e624f
Stop handling unreachable `None` case in `fn next_raw_interlaced_row`.
anforowicz Sep 21, 2024
e45e923
Fix broken doclinks
Shnatsel Sep 26, 2024
53aaa9e
Keep using the separate link specification syntax to minimize changes…
Shnatsel Sep 26, 2024
857b63c
Convert probably-working doclinks to rustdoc syntax
Shnatsel Sep 26, 2024
d96defd
Convert the rest of doclinks
Shnatsel Sep 26, 2024
e1f429e
Improve documentation on filters
Shnatsel Sep 26, 2024
a64485a
Update src/filter.rs
Shnatsel Sep 27, 2024
98286ce
Merge pull request #506 from Shnatsel/improve-filter-documentation
Shnatsel Sep 27, 2024
ed2e439
Update CHANGELOG.md
Shnatsel Sep 27, 2024
347dc5d
Bump version
Shnatsel Sep 27, 2024
6cf5bd9
Merge pull request #507 from Shnatsel/new-release
HeroicKatora Sep 27, 2024
29a8342
Don't be so humble in README (#509)
Shnatsel Sep 27, 2024
f1b75ae
Replace handwritten SIMD implementation with autovectorization for a …
Shnatsel Sep 28, 2024
272ae60
Corrections to README.md
Shnatsel Sep 29, 2024
3fbbbb1
Merge pull request #512 from Shnatsel/autovec-paeth-but-simd
Shnatsel Oct 5, 2024
581892d
Add test coverage for `PolledAfterEndOfImage` error.
anforowicz Oct 3, 2024
f5dd12f
Add test showing `next_frame` after `next_row` is temporarily stuck.
anforowicz Oct 3, 2024
3ef723b
Call `finish_decoding` after last `next_row`.
anforowicz Oct 3, 2024
657f75b
Simplify how `Reader` tracks how many frames remain to be decoded.
anforowicz Oct 3, 2024
1764d16
Fix a subset of issues identified by `cargo clippy`.
anforowicz Oct 3, 2024
1ec7613
Avoid infinite loop when retrying after earlier fatal error.
anforowicz Oct 4, 2024
ffed4de
New API: `Reader.next_frame_control` (for advancing to the next frame).
anforowicz Oct 3, 2024
7b7d1ff
Explicitly handle when `Reader.finish` is called twice.
anforowicz Oct 4, 2024
c21cac9
Stop tracking `ReadDecoder::at_eof`.
anforowicz Oct 4, 2024
f578e4c
Reuse `ReadDecoder::decode_next` from `finish_decoding`.
anforowicz Oct 9, 2024
4cdd51c
Only call `decode_next` from other `ReadDecoder` methods.
anforowicz Oct 5, 2024
c120416
Remove unnecessary error checking in `read_until_image_data`.
anforowicz Oct 5, 2024
8f3de8a
Remove unnecessary loop from `ReadDecoder.decode_next`.
anforowicz Oct 5, 2024
6b93ce4
Consolidate how `decode_next` buffer handling is done.
anforowicz Oct 5, 2024
2fb4b8e
Add separate `read_decoder.rs` module to enforce encapsulation.
anforowicz Oct 5, 2024
4dc8417
feat: Add support for parsing the sBIT chunk in the decoder
thirumurugan-git Oct 18, 2024
a778890
Remove unwanted enums for sBIT impl
thirumurugan-git Oct 18, 2024
0db0c47
Move sbit related test png's to //test/sbit/ dir
thirumurugan-git Oct 19, 2024
1d79d30
Cargo fmt
thirumurugan-git Oct 19, 2024
6bbdb50
Add EXIF and ICC encoding and fix chunk order
fintelia Oct 20, 2024
ae2dca9
Mark ReadDecoder private
kornelski Oct 21, 2024
5212eee
Merge pull request #523 from anforowicz/simplify-read-decoder-even-more
kornelski Oct 21, 2024
e87c685
Reset rustfmt to the config required by CI
kornelski Oct 21, 2024
69c4993
Upload small size image for indexed sbit chunk test
thirumurugan-git Oct 25, 2024
6016c9b
Add support for parsing `mDCv` and `cLLi` chunks. (#528)
anforowicz Oct 31, 2024
324eb68
Mark `ImageDataCompletionStatus` as `pub(crate)`
anforowicz Oct 30, 2024
70a217d
Extract a separate `unfiltering_buffer` module.
anforowicz Oct 30, 2024
e912074
Add support for parsing `cICP` chunks. (#529)
anforowicz Nov 1, 2024
a31e67a
Merge pull request #527 from anforowicz/unfiltered-rows-buffer
HeroicKatora Nov 11, 2024
194605e
Refactor parse_sbit to prevent error triggers
thirumurugan-git Nov 15, 2024
a8bf9fb
Merge pull request #524 from thirumurugan-git/impl-sbit-chunk
kornelski Nov 16, 2024
9020cd9
Add bKGD chunk parsing (#538)
ocpkn Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CIFuzz
on: [pull_request]
permissions: {}
jobs:
Fuzzing:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'image-png'
language: rust
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'image-png'
language: rust
fuzz-seconds: 120
output-sarif: true
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Upload Sarif
if: always() && steps.build.outcome == 'success'
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: cifuzz-sarif/results.sarif
checkout_path: cifuzz-sarif
77 changes: 77 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Rust CI
on:
push:
branches: [ master, main, next ]
pull_request:
branches: [ master, main, next ]
jobs:
build:
strategy:
fail-fast: false
matrix:
rust: ["1.57.0", stable, beta, nightly]
os: [ubuntu-latest, windows-latest, macos-latest]
features: [""]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@nightly
if: ${{ matrix.rust == '1.57.0' }}
- name: Generate Cargo.lock with minimal-version dependencies
if: ${{ matrix.rust == '1.57.0' }}
run: cargo -Zminimal-versions generate-lockfile

- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: build
run: |
cargo build --verbose
feature_check:
strategy:
matrix:
features: ["", "benchmarks"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: check
run: |
cargo check --tests --no-default-features --features="$FEATURES"
env:
FEATURES: ${{ matrix.features }}
powerpc_cross:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: add_cross_target
run: |
rustup target add powerpc-unknown-linux-gnu
cargo build --target powerpc-unknown-linux-gnu
test_all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup default stable
- name: test
run: >
cargo test -v --all-targets
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Run rustfmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# default
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

184 changes: 184 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,187 @@
## 0.17.14

* Updated to miniz_oxide 0.8.0.
* Added public API to consume interlaced rows one by one ([#495])
* Improved support for resuming decoding after an `UnexpectedEof`, which lets you start parsing a file before it's fully received over the network ([#496])
* Fixed some broken links in documentation, improved some documentation comments

[#495]: https://github.com/image-rs/image-png/pull/495
[#496]: https://github.com/image-rs/image-png/pull/496


## 0.17.13

* Fix `Send` bound on `Reader`.

## 0.17.12

* Reject zero-sized frames.
* Optimized decoding of paletted images.
* Removed remaining uses of miniz_oxide for decoding.
* Correct lifetime used for `Info` struct.
* Fix build issue with `-Z minimal-versions`.

## 0.17.11

* Ignore subsequent iCCP chunks to match libpng behavior.
* Added an option to ignore ancillary chunks with invalid CRC.
* Added `new_with_info` constructor for encoder.
* Removed hard-coded memory limits.
* No longer allow zero sized images.
* Added `Reader::finish` to read all the auxiliary chunks that comes after the
image.

## 0.17.10

* Added Transformations::ALPHA
* Enable encoding pixel dimensions

## 0.17.9

* Fixed a bug in ICC profile decompression.
* Improved unfilter performance.

## 0.17.8

* Increased MSRV to 1.57.0.
* Substantially optimized encoding and decoding:
- Autovectorize filtering and unfiltering.
- Make the "fast" compression preset use fdeflate.
- Switch decompression to always use fdeflate.
- Updated to miniz_oxide 0.7.
- Added an option to ignore checksums.
* Added corpus-bench example which measures the compression ratio and time to
re-encode and subsequently decode a corpus of images.
* More fuzz testing.

## 0.17.7

* Fixed handling broken tRNS chunk.
* Updated to miniz_oxide 0.6.

## 0.17.6

* Added `Decoder::read_header_info` to query the information contained in the
PNG header.
* Switched to using the flate2 crate for encoding.

## 0.17.5

* Fixed a regression, introduced by chunk validation, that made the decoder
sensitive to the order of `gAMA`, `cHRM`, and `sRGB` chunks.

## 0.17.4

* Added `{Decoder,StreamDecoder}::set_ignore_text_chunk` to disable decoding of
ancillary text chunks during the decoding process (chunks decoded by default).
* Added duplicate chunk checks. The decoder now enforces that standard chunks
such as palette, gamma, … occur at most once as specified.
* Added `#[forbid(unsafe_code)]` again. This may come at a minor performance
cost when decoding ASCII text for now.
* Fixed a bug where decoding of large chunks (>32kB) failed to produce the
correct result, or fail the image decoding. As new chunk types are decoded
this introduced regressions relative to previous versions.

## 0.17.3

* Fixed a bug where `Writer::finish` would not drop the underlying writer. This
would fail to flush and leak memory when using a buffered file writers.
* Calling `Writer::finish` will now eagerly flush the underlying writer,
returning any error that this operation may result in.
* Errors in inflate are now diagnosed with more details.
* The color and depth combination is now checked in stream decoder.

## 0.17.2

* Added support for encoding and decoding tEXt/zTXt/iTXt chunks.
* Added `Encoder::validate_sequence` to enable validation of the written frame
sequence, that is, if the number of written images is consistent with the
animation state.
* Validation is now off by default. The basis of the new validation had been
introduced in 0.17 but this fixes some cases where this validation was too
aggressive compared to previous versions.
* Added `Writer::finish` to fully check the write of the end of an image
instead of silently ignoring potential errors in `Drop`.
* The `Writer::write_chunk` method now validates that the computed chunk length
does not overflow the limit set by PNG.
* Fix an issue where the library would panic or even abort the process when
`flush` or `write` of an underlying writer panicked, or in some other uses of
`StreamWriter`.

## 0.17.1

* Fix panic in adaptive filter method `sum_buffer`

## 0.17.0

* Increased MSRV to 1.46.0
* Rework output info usage
* Implement APNG encoding
* Improve ergonomics of encoder set_palette and set_trns methods
* Make Info struct non-exhaustive
* Make encoder a core feature
* Default Transformations to Identity
* Add Adaptive filtering method for encoding
* Fix SCREAM_CASE on ColorType variants
* Forbid unsafe code

## 0.16.7

* Added `Encoder::set_trns` to register a transparency table to be written.

## 0.16.6

* Fixed silent integer overflows in buffer size calculation, resulting in
panics from assertions and out-of-bounds accesses when actually decoding.
This improves the stability of 32-bit and 16-bit targets and make decoding
run as stable as on 64-bit.
* Reject invalid color/depth combinations. Some would lead to mismatched output
buffer size and panics during decoding.
* Add `Clone` impl for `Info` struct.

## 0.16.5

* Decoding of APNG subframes is now officially supported and specified. Note
that dispose ops and positioning in the image need to be done by the caller.
* Added encoding of indexed data.
* Switched to `miniz_oxide` for decompressing image data, with 30%-50% speedup
in common cases and up to 200% in special ones.
* Fix accepting images only with consecutive IDAT chunks, rules out data loss.

## 0.16.4

* The fdAT frames are no longer inspected when the main image is read. This
would previously be the case for non-interlaced images. This would lead to
incorrect failure and, e.g. an error of the form `"invalid filter method"`.
* Fix always validating the last IDAT-chunks checksum, was sometimes ignored.
* Prevent encoding color/bit-depth combinations forbidden by the specification.
* The fixes for APNG/fdAT enable further implementation. The _next_ release is
expected to officially support APNG.

## 0.16.3

* Fix encoding with filtering methods Up, Avg, Paeth
* Optimize decoding throughput by up to +30%

## 0.16.2

* Added method constructing an owned stream encoder.

## 0.16.1

* Addressed files bloating the packed crate

## 0.16.0

* Fix a bug compressing images with deflate
* Address use of deprecated error interfaces

## 0.15.3

* Fix panic while trying to encode empty images. Such images are no longer
accepted and error when calling `write_header` before any data has been
written. The specification does not permit empty images.

## 0.15.2

* Fix `EXPAND` transformation to leave bit depths above 8 unchanged
Expand Down
Loading