refactored decodeImage, moved code into decodeColumns and decodeRows