private static void stegImageByImageType(string path, BitArray baBits, int securityLevel)
        {
            var trimPath = path.ToLower().Trim();

            // Check image type
            if (trimPath.EndsWith(".jpg") || trimPath.EndsWith(".jpeg")) // JPEG
            {
                JpegHelper.StegBinary(path, baBits, securityLevel);
            }
            else if (trimPath.EndsWith(".bmp")) // BITMAP
            {
                BmpHelper.StegBinary(path, baBits, securityLevel);
            }
            else if (trimPath.EndsWith(".png")) // PNG
            {
                PngHelper.StegBinary(path, baBits, securityLevel);
            }
            else if (trimPath.EndsWith(".gif")) // GIF
            {
                GifHelper.StegBinary(path, baBits);
            }
            else if (trimPath.EndsWith(".tif") || trimPath.EndsWith(".tiff")) // TIFF
            {
                TifHelper.StegBinary(path, baBits, securityLevel);
            }
            else if (!string.IsNullOrEmpty(trimPath))
            {
                MessageBox.Show("Wrong extension.", "StegImageUI", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }