Please help me.
Kindly tell me how to open image file in windows from C programming

Many Thanks,
Shahnaz

Member Avatar for iamthwee

What do you mean?
When you execute the program it opens up microsoft paint and displays your picture or something?

That is right, it has to open any picture file like *.bmp.

That's a non-trivial program that involves working with the different image file formats (wotsit.org is your friend) and drawing them accordingly using a non-standard graphics library. As such, your question is far too broad for us to help with. Be more specific.

That is right, it has to open any picture file like *.bmp.

If this means "yes. it has to open the file in mspaint", a quick, easy, but dirty way is to use

int main()
{
	system("mspaint filename.bmp");// filename.bmp is the image file name
	return 0;
}

in windows.

Thanks a lot friends.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.