January 2021 0 29 Report
I want to convert fingerprint binary format from database into Image files(.jpeg).. public static void binary_to_img(string name) { byte[] buffer1 = new byte[10]; string filename = name; SqlConnection con = new SqlConnection(connstring); con.Open(); SqlCommand cmd1 = new SqlCommand("select FirstFingerFingerPrintImage from TxnFingerPrint where FamilyID=" + filename + " ", con); SqlDataReader re1 = cmd1.ExecuteReader(); while (re1.Read()) { buffer1 = (byte[])re1.GetValue(0); } con.Close(); byte[] buffer = buffer1.ToArray(); string Path = @"C:\Program Files\photos\" + filename + ".jpeg"; FileStream fs = new FileStream(Path, FileMode.Create); fs.Write(buffer, 0, buffer.Length); fs.Close(); } i tried with this method..but i cant able to open the format..pls give me the solution..thans in advance
Computers & Internet
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Helpful Social

Copyright © 2024 QA.XPDF.PUB - All rights reserved.