You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the contents of the attached file are removed after the file is parsed and unparsed using Daffodil 2.7.0 (Java API), and the image is no longer viewable. This appears to be due to the file being truncated when an invalid chunk is encountered.
The text was updated successfully, but these errors were encountered:
The PNG schema is essentially just a series of "Chunks". Each chunk has a four letter tag idenfier, for exampe "IHDR" is the chunk id for the png header chunk. The full list of PNG tag id's is here: https://exiftool.org/TagNames/PNG.html
So it looks like we only define about half of the full list. Because the schema doesn't define all of them, if a PNG contains an unknown id then it stops parsing at the last successful parsed chunk and warns that there is left over data. So this is why the file appears to be truncated when unparsed, because the infoset only contains data up to the first unknown chunk id.
In this particular case, it looks like we are finding a "vpAg" chunk, which our schema does not support. Ideally we would update these schemas to support all of the tag's and parse them in detail, but that's a bit of work. In the meantime, it might make sense to added branches to the choice in the above link to parse the unknown tags as xs:hexBinary. For example, for this missing vpAg tag, we could add this:
Most of the contents of the attached file are removed after the file is parsed and unparsed using Daffodil 2.7.0 (Java API), and the image is no longer viewable. This appears to be due to the file being truncated when an invalid chunk is encountered.
The text was updated successfully, but these errors were encountered: