473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Drawing and images in C

I'm making a program in C, in which I would like to be able to show
images and to draw on the screen. How can I do that?

Michael K. P.
Nov 14 '05 #1
5 2165
Michael Kragh Pedersen wrote:

I'm making a program in C, in which I would like to be able to show
images and to draw on the screen. How can I do that?


This depends to a large extent on which platform(s) you wish to target.
Basically, you need to find a graphics library that is supported on
(or at least available for!) your platform, and use its routines to do
graphical things you want to do. The following list is most definitely
non-exhaustive.

MS-DOS: (Borland) BGI, various Microsoft C extensions, Allegro.

Win32: Win32 API, GTK+, SDL, Allegro.

Linux: (at least) XLib, GTK+, SDL, Allegro(?).

Atari: last I checked, Atari machines had a graphics library in
ROM, called VDI.

Mac etc: no idea, sorry.

Discussion of how to use these libraries is beyond the scope generally
accepted as topical by comp.lang.c regular contributors, so you will
need to find a newsgroup that deals with the platform you are targeting
if you want further help.
Nov 14 '05 #2
Michael Kragh Pedersen <m_**************@hotmail.com> wrote:
I'm making a program in C, in which I would like to be able to show
images and to draw on the screen. How can I do that?


That question is off-topic for this group: the group is dedicated
to discussing standard c, which tends to be a rather narrow subject.
The c language has no way of showing an image or drawing on the
screen, that capability tends to be platform dependent and is provided
by non-standard c libraries.

comp.os.ms-windows.programmer.win32 is probably the group you are
looking for (you didn't specify an OS, I'm assuming windows). But
don't post: Go to groups.google.com or groups.google.ca and
search the archives for your question. You don't want to ask
the same question that was answered last week!

However, your question is poorly worded, I suggest reading this
first:

http://www.catb.org/~esr/faqs/smart-questions.html

Google's web search is also an alternative, and is probably worth
checking first, try searching for "<platform> programming tutorial".
When I tried searching for "windows programming tutorial" I found many
links.

--
With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925
Nov 14 '05 #3
infobahn wrote:
Michael Kragh Pedersen wrote:
I'm making a program in C, in which I would like to be able to show
images and to draw on the screen. How can I do that?

This depends to a large extent on which platform(s) you wish to target.
Basically, you need to find a graphics library that is supported on
(or at least available for!) your platform, and use its routines to do
graphical things you want to do. The following list is most definitely
non-exhaustive.

MS-DOS: (Borland) BGI, various Microsoft C extensions, Allegro.

Win32: Win32 API, GTK+, SDL, Allegro.

Linux: (at least) XLib, GTK+, SDL, Allegro(?).

Atari: last I checked, Atari machines had a graphics library in
ROM, called VDI.

Mac etc: no idea, sorry.

Discussion of how to use these libraries is beyond the scope generally
accepted as topical by comp.lang.c regular contributors, so you will
need to find a newsgroup that deals with the platform you are targeting
if you want further help.

Well, since it's only something, I'm making for my own computer, I can
settle with Win32 :)

But I will do that, although for me, the scope of this newsgroup is
logically everything, that has to do with the C language...you can't
really expect ppl to read from the name, that it's only for standard C,
I think :)

Michael K. P.
Nov 14 '05 #4
Michael Kragh Pedersen <m_**************@hotmail.com> wrote:
But I will do that, although for me, the scope of this newsgroup is
logically everything, that has to do with the C language...you can't
really expect ppl to read from the name, that it's only for standard C,
I think :)


That's why its considered polite to hunt down any FAQs the newsgroup
has, as well as to search the group's archives to see if the question
has been asked before.

--
With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925
Nov 14 '05 #5
Jesse Meyer wrote:
Michael Kragh Pedersen <m_**************@hotmail.com> wrote:
But I will do that, although for me, the scope of this newsgroup is
logically everything, that has to do with the C language...you can't
really expect ppl to read from the name, that it's only for standard C,
I think :)

That's why its considered polite to hunt down any FAQs the newsgroup
has, as well as to search the group's archives to see if the question
has been asked before.

The last is true, and I usually do that every time, but I hardly ever
find the answers, I need :)

Michael K. P.
Nov 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tomi Holger Engdahl | last post by:
I am looking for a solution to add on-line drawing tool to a phpBB discussion board. The idea would be that the users can draw their own simple drawings with the tool and attach them easily as...
1
by: zengou | last post by:
My application have many picturebox objects,when run it ,sometimes i will have a strange error,how to work out ,help me please!(in windows98,the error cause frequently than in windowsxp) ...
4
by: funcSter | last post by:
Hey, got a prob which is driving me nuts! I'm trying to resize the resolution of an image as well as it's pyhsical byte size. I've got: byte bytImage = null; System.Drawing.Image imgImage =...
2
by: billy | last post by:
I'm working on a sort of paint program that has the usual canvas pane in the middle of the main form. I'm working on that class and have a couple quick questions.. actually more like I'm looking...
3
by: anastasia | last post by:
I get an out of memory exception when attempting to excecute the following code: original = System.Drawing.Image.FromFile(file.FileName,true); I ONLY get this exception when the file is in the...
7
by: Marc Pelletier | last post by:
Hello all, I have a class which includes a method to create a chart. I want to be able to call this method from asp.net code as well as windows application code, so I have sketched it out as...
2
by: George | last post by:
Dear colleagues, I refer to your help with specific graphic problem. It is necessary to create a viewfinder in graphic application. It seems that the algorithm is simple: just draw lines in...
7
by: bookon | last post by:
I was running into the System.Drawing.Image.FromStream "parameter is not valid" on some of the images I was retrieving from a blob column in Sql Server. I thought there were corrupt images as...
2
by: ThatsIT.net.au | last post by:
I have this code that writes a pie chart in a asp.net page, but I want to use it in a server control. When I try I get a error on the last line "Response.OutputStream" Obviously there is no...
1
by: saadkhan | last post by:
please help me that how could i be able to save images in an array. I have made an array like: System.Drawing.Image arr = new System.Drawing.Image; But i have no idea how to save different images...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.