Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0e939fc
ENH: Add BlackIs1t functionality to tiff_header
j-t-1 Aug 5, 2025
8251794
Update comment
j-t-1 Aug 5, 2025
e8c3b46
Use BlackIs1
j-t-1 Aug 5, 2025
fdab7f3
Use BlackIs1
j-t-1 Aug 5, 2025
31a20fc
Remove unused import
j-t-1 Aug 5, 2025
bba6643
Update pypdf/filters.py
j-t-1 Aug 5, 2025
765042c
Set defaults
j-t-1 Aug 5, 2025
bd67505
Update pypdf/filters.py
j-t-1 Aug 5, 2025
74d6b4a
Use lowercase names
j-t-1 Aug 5, 2025
decb945
Fix error
j-t-1 Aug 5, 2025
a3f6c43
Use BLACK_IS_1
j-t-1 Aug 5, 2025
52e30b2
Reorder if statements
j-t-1 Aug 5, 2025
abb0572
Correct to attribute
j-t-1 Aug 6, 2025
a9a7c43
Add comment for explanation
j-t-1 Aug 6, 2025
df6e2d1
Fix error
j-t-1 Aug 6, 2025
7198caf
Fix AssertionError
j-t-1 Aug 6, 2025
40269cd
Fix coverage
j-t-1 Aug 6, 2025
cb88a5c
Fix coverage
j-t-1 Aug 6, 2025
2379168
Update pypdf/filters.py
j-t-1 Aug 6, 2025
ba56ed5
Update pypdf/filters.py
j-t-1 Aug 6, 2025
8245894
Fix mistakes
j-t-1 Aug 6, 2025
5adfbd6
More fixes
j-t-1 Aug 6, 2025
b4e46e8
Fix errors
j-t-1 Aug 6, 2025
81d443f
Try to fix errors
j-t-1 Aug 6, 2025
09ca588
Try and fix
j-t-1 Aug 6, 2025
f5dde43
Try and fix errors
j-t-1 Aug 6, 2025
e3c971d
Remove duplicate comment
j-t-1 Aug 6, 2025
900bdd2
Try to fix
j-t-1 Aug 6, 2025
254fba0
Reintroduce rows
j-t-1 Aug 6, 2025
72236c0
Try and fix
j-t-1 Aug 6, 2025
2550076
Revert test
j-t-1 Aug 6, 2025
8dc5db5
Reintroduce type ignore
j-t-1 Aug 7, 2025
7b69880
Fix coverage
j-t-1 Aug 7, 2025
557035d
Fix more errors
j-t-1 Aug 7, 2025
5a6e554
Fix more errors
j-t-1 Aug 7, 2025
0189769
Merge branch 'main' into CCITTParameters
stefan6419846 Aug 7, 2025
4a5328b
simplify
stefan6419846 Aug 8, 2025
427afae
do not merge expected parameters
stefan6419846 Aug 8, 2025
82e54ca
fix typo
stefan6419846 Aug 8, 2025
4555d87
Update pypdf/filters.py
stefan6419846 Aug 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pypdf/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,10 @@ class CCITTParameters:
K: int = 0
columns: int = 0
rows: int = 0
EndOfBlock: Union[int, None] = None
EndOfLine: Union[int, None] = None
EncodedByteAlign: Union[int, None] = None
EndOfLine: Union[bool, None] = None
EncodedByteAlign: Union[bool, None] = None
EndOfBlock: Union[bool, None] = None
BlackIs1: Union[bool, None] = None
DamagedRowsBeforeError: Union[int, None] = None

@property
Expand Down Expand Up @@ -652,7 +653,7 @@ def decode(
262, # Thresholding, SHORT, 1, 0 = BlackIs1
3,
1,
0,
0 if params.BlackIs1 is True or params.BlackIs1 is None else 1, # Thresholding, SHORT, 1, 0 = BlackIs1
273, # StripOffsets, LONG, 1, length of header
4,
1,
Expand Down
Loading