Near-lossless image authentication transparent to near-lossless compression