|
Subject:
|
How to open a file in c#?
|
|
Posted By:
|
looooly
|
Post Date:
|
9/24/2004 5:24:01 AM
|
I want to open a BMP(bitmap picture) sourcecode file in c#,could you help me? I'm a begainner.thank you very much.
|
|
Reply By:
|
Imar
|
Reply Date:
|
9/24/2004 10:40:08 AM
|
What do you mean with "open a BMP(bitmap picture) sourcecode file"? What are you going to do with the bitmap once you have opened it?
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. While typing this post, I was listening to: Numb by Portishead (Track 6 from the album: Dummy) What's This?
|
|
Reply By:
|
looooly
|
Reply Date:
|
9/24/2004 10:14:03 PM
|
Hello,thank you,my English is not good. I only want to know how to open it,and how to search which parts mean its wide or heigh,etc. I am begainner in c#,so i can't do nothing now.
|
|
Reply By:
|
Imar
|
Reply Date:
|
9/25/2004 3:39:16 AM
|
Did you try Google for this? There are tons of articles about image handling in C#.
Anyway, like I asked before: what are you going to do with the bitmap? Do you just need the width and height? Or are you going to change the image, load it in a PictureBox or do something else with it?
But in its simplest form, you retrieve the Width and Height like this: Image curImage = Image.FromFile(@"C:\MyBitmap.bmp");
MessageBox.Show(curImage.Width.ToString()); Cheers,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|