Some refactoring in the cr2 decoder before playing with jpeg
temporary hacky implementation of the cr2 decoder using the embedded thumbnail