How to change Binaryformat of fingerprint from Database to Image format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ram123
    New Member
    • Nov 2011
    • 1

    How to change Binaryformat of fingerprint from Database to Image format

    hi all,
    I wanna convert Fingerprint Binaryformat(Im age only not Template) to Image(.png/.jpeg) format....i tried with all possible methods..but it doesn't work...here am posted the code for sample..can anyone Fix this Issue?

    SqlConnection con = new SqlConnection(c onnstring);
    con.Open();
    SqlCommand cmd2 = new SqlCommand("sel ect FingerPrintImag e from TxnFinger where FamilyID=" + filename + " ", con);
    SqlDataReader re2 = cmd2.ExecuteRea der();
    while (re2.Read())
    {
    buffer1 = (byte[])re2.GetValue(0 );
    }
    con.Close();
    byte[] buffer = buffer1.ToArray ();

    string path = Environment.Cur rentDirectory + "\\capture\ \" + filename1 + ".png";

    FileStream fs = new FileStream(path , FileMode.Create );
    fs.Write(buffer , 0, buffer.Length);
    fs.Close();



    Thanks in Advance!!
Working...