public override void Encrypt(byte[] key, byte[] iv, string encryptData = null) { string temppic = Path.GetTempPath() + "temp" + Path.GetExtension(filePath); Image imgInput = Image.FromFile(this.filePath); imgInput = (Image)SteganographyWrapper.HideTextInImage(encryptData, (Bitmap)imgInput); imgInput.Save(temppic); imgInput.Dispose(); System.IO.File.Delete(filePath); System.IO.File.Copy(temppic, filePath); }