mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-05 18:19:50 +00:00
M8: the test of rows too wide for Group 4 says Group 4 refused them
Flate coming out didn't show that: Group 4 could have been coded and lost on size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
This commit is contained in:
1 parent
53874375cb
commit
5660075295
1 file changed
+1
@@ -978,6 +978,7 @@ fn a_cleared_image_group_4_wouldnt_shrink_stays_flate() {
|
||||
let wide = pdfcraft_filters::MAX_G4_COLUMNS as usize + 1;
|
||||
for (w, h) in [(3usize, 2usize), (wide, 2)] {
|
||||
let stride = w.div_ceil(8);
|
||||
assert_eq!(pdfcraft_filters::encode_g4(&vec![0xFF; stride * h], w as u32, h as u32).is_ok(), w != wide, "{w} × {h}");
|
||||
let dict = format!("/Type /XObject /Subtype /Image /Width {w} /Height {h} /BitsPerComponent 1 /ColorSpace /DeviceGray /Filter /FlateDecode");
|
||||
let mut doc = one_page(
|
||||
b"q 200 0 0 20 0 100 cm /Im Do Q",
|
||||
|
||||
Reference in new issue
Block a user