public Bitmap HideBytes(byte[] data, Bitmap image, AlgorithmSettings settings) { Color[] colors = BitmapConverter.BitmapToColorArray(image, settings.Direction); var cleaned = BitmapConverter.CleanColorArrayFromLSB(colors); int offset = CalculateOffset(settings.OffsetX, settings.OffsetY, image.Width, image.Height, settings.Direction); var hiden = WriteBytesInColorArray(data, cleaned, offset); return(BitmapConverter.ColorArrayToBitmap(hiden, image.Width, image.Height, settings.Direction)); }