Encodes data in images