954,480 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Graphics program in c language

Hi all,
Could you tell me how to write simple graphics program in c, for example, how to take the format of bmp, pgm, csd file from image file?
how to convert from one format to other? If anybody knows a good book or web site, please tell me soon.

diddle
Newbie Poster
11 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

This might help -- shows different file formats.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 
This might help -- shows different file formats.


Thanks for your reply.

diddle
Newbie Poster
11 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 
This might help -- shows different file formats.

True , that site contains much more to know about file types.
and their healders. But I'm too lazy to write the helder parsing and
data extraction framework. Instead of writing it groud up what I doing
is just normally download a framework ( open source ) and use it.

Just google about C++ image libraries you will get what you need.

NicAx64
Posting Pro
536 posts since Mar 2009
Reputation Points: 86
Solved Threads: 43
 

anyway sorry about giving you a lazy idea !
no if you doing this as a assignment then write it your own. if not
your in a somepart of a big project then go ahead and use it.

The circle is invented already , you gain nothing redesigning it but that's the only way to gain experience.

NicAx64
Posting Pro
536 posts since Mar 2009
Reputation Points: 86
Solved Threads: 43
 

Nic: you answered a 4-year-old thread! The op has probably died of old age by now.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

hw to draw nonlinear objects

priya.t
Newbie Poster
1 post since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

Welcome to the forum, Priva.t! ;)

A few very solid suggestions for you:

1) For your problems, unless it's EXACTLY the same, always start a new thread
2) You have to be VERY specific about what you are asking about. "Draw nonlinear objects", doesn't tell anyone what you are stumped on doing.

3) With your first post on a subject, post your efforts to solve the problem. This is a forum policy to reduce the "I need the codes for this!" kind of posts.

Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185
 
hw to draw nonlinear objects

There are algorithms to draw that kind of objects.
For cricles you can use midpoint cricle drawing algorithm.
a modified version of midpoint algorithm can be used to draw elipses. http://en.wikipedia.org/wiki/Midpoint_circle_algorithm


for the B-spline curves there are little bit complex algorithms.
You better read a rasterization algorithm chapter in a computer graphics book
if you want to implement those by hand.
I recommand you to read books like Computer Graphics C Version 2Ed Donald Hearn,
Graphics GEMS I,II,II like books.

or else you a 3rd party library to draw those things.I suggest you to use the
OpenGL it's very nice for scientific computing (actually good for game developing too).
Or in a simple way you can use SDL like simple library.

NicAx64
Posting Pro
536 posts since Mar 2009
Reputation Points: 86
Solved Threads: 43
 

its good

nitin khare
Newbie Poster
2 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

plese give me a graphics programs in c language......and how to use

dnyaneshwarp
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 
Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You