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

Do not describe raw data as a table #8579

Merged
merged 1 commit into from
Dec 16, 2024
Merged

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