Skip to content

Conversation

@radarhere
Copy link
Member

bytes_value = size if size > 32 else repr(data)
msg += f" - value: <table: {bytes_value} bytes>"

If size is greater than 32, then this gives

tag: unknown (8192) - type: byte (1) Tag Location: 94 - Data Location: 0 - value: <table: 159 bytes>

If it is not, then this gives

tag: SamplesPerPixel (277) - type: long (4) - value: <table: b'\x92\x00\x12\x12' bytes>

I don't think we need to describe these bytes as a 'table'. It can be simplified to just

tag: SamplesPerPixel (277) - type: long (4) - value: b'\x92\x00\x12\x12'>

@radarhere radarhere added the TIFF label Dec 2, 2024
@hugovk hugovk merged commit 2c120b5 into python-pillow:main Dec 16, 2024
49 checks passed
@radarhere radarhere deleted the tiff_debug branch December 16, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants