Skip to content

Do not describe raw data as a table#8579

Merged
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:tiff_debug
Dec 16, 2024
Merged

Do not describe raw data as a table#8579
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:tiff_debug

Conversation

@radarhere
Copy link
Copy Markdown
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
@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