My program will take an image from user "picComputerImage" and matched it with different images that stored in my database..and display the matched in "picdatabaseImage" which is an imagebox.
I have a table called "Images" that contains "image_id" and "image" ..
in "image" field I store the name of image with extension
also, I keep all the images in a folder "pic"
I want to retrieve each image from that table and convert it to bitmap.Then I should re-size the bitmap
I tried this code but it didn't work..I'm getting stuck in my project...
foreach (DataRow dr in ds.Tables["Images"].Rows)
path = "C:\\Users\\OMAN\\Desktop\\My Subjects\\INSTRUCTION _REPORTcourse\\compare\\compare\\pic\\" + dr["image"].ToString();
bmDatabaseImage = (Bitmap)Image.FromFile(path.ToString());
picDatabaseImage.Image = bmDatabaseImage;
bmComputerImage = (Bitmap)picComputerImage.Image;
bmDatabaseImage = (Bitmap)picDatabaseImage.Image;
Bitmap bmNewCI = new Bitmap(bmComputerImage,600, 600);
Bitmap bmNewDI = new Bitmap(bmDatabaseImage, 600, 600);
picComputerImage.Image = bmNewCI;
picDatabaseImage.Image = bmNewDI;