Skip to content

Conversation

kwhopper
Copy link
Collaborator

@kwhopper kwhopper commented Feb 20, 2017

First try at (most of) drewnoakes/metadata-extractor#232

Consider this ALPHA; I'd really like a lot of feedback before you/we integrate this PR. There is some commented-code I want to keep in there until some review is done.

The main change is obviously no more byte arrays in a jpegsegment. Instead, the absolute location values are stored as @drewnoakes implemented in ShowJpegStructure with a few updates. This implied that two passes would be required, at least in this implementation. The first pass records the segments, the second pass extracts the metadata expecting a reference to the original still-open Stream.

JpegSegmentReader has some notable changes and most are self-explanatory. One relates to drewnoakes/metadata-extractor#234 and processing beyond the first Sos marker. I decided to leave multiple SOS processing in there for this PR, but ultimately I think it should be removed and put the "yield break;" back (it's commented out). ExifTool says that metadata stops after Sos is reached. I tend to agree; DHT data feels outside the scope of this library. But that's certainly open to debate.

Let me know what you guys want to do, and please look over the code if you get some time.

@kwhopper
Copy link
Collaborator Author

kwhopper commented Apr 2, 2017

Update - with buffering, SOS processing is more reasonable and can probably stay. It still adds about 60% extra processing time for the entire images repository, but without buffering it was more like 500%.

This was referenced May 2, 2018
@drewnoakes drewnoakes deleted the branch drewnoakes:master January 29, 2024 00:39
@drewnoakes drewnoakes closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants