?
Solved

open an image file

Posted on 2004-11-21
5
Medium Priority
?
273 Views
Last Modified: 2010-04-15
Greetings,

Is it possible to open an image file using c#, if yes, can someone provides the syntax.

Thanks
0
Comment
Question by:mfcseeker
3 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 252 total points
ID: 12640672
Hello

it's very simple, just add PictureBox control on the form and use this

      pictureBox1.Image = new Bitmap("c:\\pic.bmp");

HTH
0
 
LVL 11

Assisted Solution

by:jatinderalagh
jatinderalagh earned 248 total points
ID: 12641840
can be done using

System.Drawing.Image img = System.Drawing.Image.FromFile(@"c:\pic.jpg");

cheers
Jatinder
0
 
LVL 1

Author Comment

by:mfcseeker
ID: 12646825
Thanks for both of you, it worked fine, just another simple questions....

How can I change the colors of the image from RGB to CMYK and vice versa?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month16 days, 4 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question