Reverse engineering of double compressed images in the presence of contrast enhancement