Skip to content

Conversation

@kerozin
Copy link

@kerozin kerozin commented Sep 22, 2023

I faced the issue with files having trailing 0x00 in xmp meta information. The files was originally generated with Canon Digital Photo Professional and later edited in MacOs Preview to add image description to the meta information. I haven't investigated which program exactly added trailing zero byte but fix is dealing with it fine

Changes proposed in this pull request:
Add xmp content stripping 0x00 bytes

… 0x00 byte

I faced the issue with files having trailing 0x00 in xmp meta information. The files was originally generated with Canon Digital Photo Professional and later edited in MacOs Preview to add image description to the meta information. I haven't investigated which program exactly added trailing zero byte but fix is dealing with it fine
@radarhere
Copy link
Member

Are you able to add a test our test suite, that fails without this fix and passes with it?

If not, could you attach the image here?

@radarhere radarhere changed the title JpegImagePlugin.py fix to resolve issue with xmp meta having trailing… Fix JpegImagePlugin when XMP meta has trailing 0x00 byte Sep 22, 2023
@kerozin
Copy link
Author

kerozin commented Sep 22, 2023

Alas I'm not yet familiar with the testing system. Here is the file to reproduce the issue and make the test.
https://github.com/python-pillow/Pillow/assets/11209456/c85df7d5-5314-4dad-bc3c-7a568cd620b6

@radarhere
Copy link
Member

This has been fixed instead by #7274

@radarhere radarhere closed this Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants