Split some code into a private shared library
This will let us add unit tests, which are going to be critical for the new image codecs being worked upon.
This will let us add unit tests, which are going to be critical for the new image codecs being worked upon.