Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to read the contant in .jpeg image file using c#.net and save the sel
ected contant in sql server 2005.
Posted
Comments
SRK90 6-Aug-14 8:09am    
do you want to read the image from file uploader or what ?
Amit Bhoi 6-Aug-14 8:13am    
i want the read contant of that uploaded image
Sergey Alexandrovich Kryukov 7-Aug-14 1:13am    
Why? why?!
—SA

If you want to detect and read text in an image, that's called Optical Character Recognition, or shortly OCR. There are some libraries available for that purpose.
If you have special requirements (e.g. some Indian alphabets instead of English), make sure that you select a library which supports also that.
 
Share this answer
 
If you want to read the content from FileUpload. then follow the below :

.aspx :

<asp:fileupload id="FileUploadControl" runat="server" xmlns:asp="#unknown">


.cs :

protected void read_image()
{
VB
if(FileUploadControl.HasFile)

{
Image_Bytes bytes[] = FileUploadControl.FileBytes;
// Then pass the bytes value to your database table through your SQL connection
}


In SQL Server :

CREATE TABLE Image_Bytes
(
Image_ID INT PRIMARY KEY,
Image_Bytes IMAGE
)

Use the type as IMAGE to save the image bytes you get it from .cs page.

Please let me know is this what you are searching for !!!
Happy Coding :)
 
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