Click here to Skip to main content
15,868,039 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I need code for convert 3d image to binary in c#.
Posted

1 solution

I think this will help you..

C#
OpenFileDialog fop = new OpenFileDialog();
fop.InitialDirectory = @"C:\";
fop.Filter = "[JPG,JPEG]|*.jpg";
if (fop.ShowDialog() == DialogResult.OK)
{
  FileStream FS = new FileStream(@fop.FileName, FileMode.Open, FileAccess.Read);
  byte[] img = new byte[FS.Length];
  FS.Read(img, 0, Convert.ToInt32(FS.Length));
}


you need to import this namespace

C#
using System.IO;


I think this will help you..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900