Click here to Skip to main content
13,256,012 members (50,439 online)

Open several images in C#

bmw318mt asked:

Open original thread
I need to open several images from a folder and with every image I need to convert it to binary format. How can I open several files automatically within folder\sub folders?

Right Now I am able to open 1 file at a time by manually choosing form the openFileDialog.
openFileDialog1.FileName = "";
openFileDialog1.Title = "Images";           
openFileDialog1.Filter = "Png Images| *.png"; 
if (openFileDialog1.FileName.ToString() != "")
   Image.ImageLocation = openFileDialog1.FileName.ToString();
   img = new Bitmap(openFileDialog1.FileName.ToString());
Tags: C#


When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).

Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100