evanoberholster / imagemeta

Image Metadata (Exif and XMP) extraction for JPEG, HEIC, AVIF, TIFF and Camera Raw in golang. Focus is on providing features and improved performance.
MIT License
116 stars 12 forks source link

WIP: Temporary fix for parseJpeg() stub. #31

Closed abrander closed 2 years ago

abrander commented 2 years ago

For others following develop, this may be handy if using said branch for parsing JPEG.

I don't fully understand the code, and this PR is basically untested. I'll close it when a real fix emerges.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1986966720


Changes Missing Coverage Covered Lines Changed/Added Lines %
imagemeta.go 0 12 0.0%
<!-- Total: 0 12 0.0% -->
Files with Coverage Reduction New Missed Lines %
imagemeta.go 1 0%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 1913214766: -0.1%
Covered Lines: 2693
Relevant Lines: 5102

💛 - Coveralls
evanoberholster commented 2 years ago

Thanks for the PR. I am working on rewriting the imagemeta package. From testing different solutions it seems that the best would be to use:

exif function of

// Exif Function
exifFn := func(r io.ReadAt, header meta.ExifHeader) error {
}
// XMP Function
xmpFn := func(r io.Reader, header meta.XmpHeader) error {
}

This would mean that each Parsing function (JPEG, TIFF, CR2, CR3, NEF, CRW, etc.) would need to change to:

Scan(io.ReadAt, exifFn, xmpFn) error {
}

I would appreciate any suggestions that you have as this is definitely still a WIP.

abrander commented 2 years ago

This is not relevant after #33 - I'm closing it. Thanks for writing this library!