Example #1
0
        private void Visszafejtes(string fileNev)
        {
            BitmapImage bmp = new BitmapImage();

            bmp.BeginInit();
            bmp.CacheOption   = BitmapCacheOption.OnLoad;
            bmp.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
            bmp.UriSource     = new Uri(fileNev);
            bmp.EndInit();

            WriteableBitmap wbmp = new WriteableBitmap(bmp);

            int arraySize = wbmp.BackBufferStride * bmp.PixelHeight;

            byte[] originalPixels = new byte[arraySize];
            bmp.CopyPixels(originalPixels, wbmp.BackBufferStride, 0);

            SztegoLSB lsb = new SztegoLSB();

            TextBoxVisszafejtett.Text = lsb.Visszafejtes(originalPixels);
        }