RawParser is a GO library for extracting: the embedded JPEGs from a camera RAW file and metadata. It's current incarnation parses TIFF-based RAW files. There are existing tools that perform this or similar functionality; however, the reasons for creating this tool:
- I have many RAW files that are processed using commercial software, yet on occassion, I would like the camera-produced JPEG for comparison.
- To utilize the concurrency model provided by the GO language to process multiple files without any explicit "traditional" locking (e.g, mutexes)
- Experiment with GO's "C" package and interfacing with existing C libraries.
My jpegextract utility utilizes this library and may serve as a usage example.
- GO 1.2 (maybe older GO 1.1.2? but not tested)
- Optional (highly-recommended):
- C++ JPEG Compressor/Decompressor. The source is included in this project. Only a c/c++ compiler is needed, no other libraries.
- libjpeg
- TurboJpeg
- If you have many JPEGs to extract, TurboJpeg provides noticebly better performance.
- Obtain the library:
go get github.com/jeremytorres/rawparser
- Execute the tests
cd $GOPATH/src/github.com/jeremytorres/rawparser
Test with GO's image/jpeg library:
go test
Test with libjpeg library:
go test -tags jpeg
Test with turbojpeg library:
go test -tags turbojpeg
Test with standalone c++ library:
go test -tags jpegcpp
- I consider the current status a beta version as there is a laundry list of this I will like to support:
- Add performance benchmarks
- Add additional camera RAW file support
- Create a "better" parser interface