convert Bitmap to Image

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
Hi friends
I have a bit problem.
I am working in asp.net 2.0 with c#.
In my application,I scan fingerprint of user  from scanner and display it in Image control.
Now my problem is that I dont know that how to insert that image in sqldatabase as image datatype.
Here is another way.
I have one class called sfr and it has one method to get image of finger and it return in Bitmap format.
for this my code is here. <font color="#008080" size=2>
Bitmap</font><font size=2> Finger = sfr.GetLastImage();
System.Web.UI.WebControls.</font><font color="#008080" size=2>Image</font><font size=2> CandFinger=</font><font color="#0000ff" size=2>new</font><font size=2> System.Web.UI.WebControls.</font><font color="#008080" size=2>Image</font><font size=2>();
CandFinger =(System.Web.UI.WebControls.</font><font color="#008080" size=2>Image</font><font size=2>) </font><font color="#008080" size=2>Convert</font><font size=2>.ChangeType(Finger, </font><font color="#0000ff" size=2>typeof</font><font size=2>(System.Web.UI.WebControls.</font><font color="#008080" size=2>Image</font><font size=2>)); </font>
sfr is my class and getlastmethod is method that return scanned image of user.
Now I want to convert this image in Image object becouse of in my database I want to save this image in image datatype.
but last line of this code gives error that Object must implement IConvertible.
 
For this what I have to do?
 
Can I insert Bitmap image as an Image datatype?
Plz help me out and give me right solution.
 
Thanks in advance.
 

View the full article
 

Similar threads

T
Replies
0
Views
571
This_display_name_is_already_in_use_They_all_are
T
C
Replies
0
Views
145
CompuTechSide
C
Back
Top