Efficient common-core lossless and lossy image coder based on integer wavelets