41 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.ComponentModel;
 | |
| using System.Data;
 | |
| using System.Drawing;
 | |
| using System.Text;
 | |
| using System.Windows.Forms;
 | |
| using System.IO;
 | |
| using VEPROMS.CSLA.Library;
 | |
| using Volian.Controls.Library;
 | |
| 
 | |
| 
 | |
| namespace TestImageZip
 | |
| {
 | |
| 	public partial class Form1 : Form
 | |
| 	{
 | |
| 		public Form1()
 | |
| 		{
 | |
| 			InitializeComponent();
 | |
| 			string imgfile = @"C:\16bit\Debug\WCNRO\ro\00-012.bmp";
 | |
| 			byte[] ab;
 | |
| 
 | |
| 			using (FileStream fsIn = new FileStream(imgfile, FileMode.Open, FileAccess.Read, FileShare.Read))
 | |
| 			{
 | |
| 				// Create an instance of StreamReader that can read characters from the FileStream.
 | |
| 				BinaryReader r = new BinaryReader(fsIn);
 | |
| 				ab = r.ReadBytes((int)fsIn.Length);
 | |
| 				r.Close();
 | |
| 				fsIn.Close();
 | |
| 				// tst first time:
 | |
| 				PreviewROImage pvROImg = new PreviewROImage(ab, "Test Zip");
 | |
| 				pvROImg.ShowDialog();
 | |
| 
 | |
| 			}
 | |
| 			byte [] compress = ROImageInfo.Compress(ab);
 | |
| 			byte[] decompress = ROImageInfo.Decompress(compress);
 | |
| 			PreviewROImage pvROImg1 = new PreviewROImage(decompress, "Test Zip");
 | |
| 			pvROImg1.ShowDialog();
 | |
| 		}
 | |
| 	}
 | |
| } |