468,315 Members | 1,501 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,315 developers. It's quick & easy.

displaying 24 bit colours using C

hi guys, got anything on this issue?

Mar 1 '06 #1
9 1916

piyush2...@gmail.com wrote:
hi guys, got anything on this issue?


Nothing, sorry. Wrong door...

--
BR, Vladimir

Mar 1 '06 #2
pi********@gmail.com said:
hi guys, got anything on this issue?


(The issue in question is that of displaying 24 bit colours using C.)

The C language is so popular at least in part because it is widely
available, on a huge range of platforms, by no means all of which are
capable of displaying any colours at all, let alone 24-bit colour.

Personally, I think it would be a good thing for C to specify a basic set of
graphics primitives (including a function to enquire just what, if any,
graphics hardware is available on the system in question) - but it doesn't.

The language instead leaves the entire issue in the hands of third-party
library developers.

The kind of library you'll need to use for displaying colour depends largely
on your platform. For discussing platform-specific issues such as this, you
will find it more profitable to enquire on a newsgroup devoted to the
platform you are targetting.

Possibilities include news:comp.os.ms-windows.programmer.win32 and
comp.unix.programmer (among others).

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Mar 1 '06 #3
I meant to ask whether its possible to display 24 bits colour pixels
using assembly in C .
I was able to display 64K colours using assembly but failed to display
24 bit colours because
probably my VESA card does'nt support this. But possibly I could
directly use the monitor
for the same without using any intermediate service. Anyone - Please!

Mar 1 '06 #4

voldemort wrote:
I meant to ask whether its possible to display 24 bits colour pixels
using assembly in C .
I was able to display 64K colours using assembly but failed to display
24 bit colours because
probably my VESA card does'nt support this. But possibly I could
directly use the monitor
for the same without using any intermediate service. Anyone - Please!


And how on earth do you think this is a question related to C? Your
original post actually might have been vaguelly topical in the sense of
the reply that Richard bothered to post elsethread. Dragging assembly
(not to mention graphic cards and monitors which are not even software
devices) into it makes it stratospherically off-topic.

Also, quote what and who you're replying to. If you use Google, click
Show Options and then Reply that appears below headers. It works, and
is good manners 'round here.

--
BR, Vladimir

Mar 1 '06 #5
"Vladimir S. Oka" <no****@btopenworld.com> writes:
[...]
Also, quote what and who you're replying to. If you use Google, click
Show Options and then Reply that appears below headers. It works, and
is good manners 'round here.


Vladimir, if you're going to give this advice, please consider also
citing <http://cfaj.freeshell.org/google/>. It explains the issue
more clearly than we can do here in a single post, and it also has a
number of useful links on Usenet etiquette.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 1 '06 #6
Keith Thompson wrote:
"Vladimir S. Oka" <no****@btopenworld.com> writes:
[...]
Also, quote what and who you're replying to. If you use Google, click
Show Options and then Reply that appears below headers. It works, and
is good manners 'round here.


Vladimir, if you're going to give this advice, please consider also
citing <http://cfaj.freeshell.org/google/>. It explains the issue
more clearly than we can do here in a single post, and it also has a
number of useful links on Usenet etiquette.


I know I should. Posting from the office, I'm forced to use Google (you
can tell by the absence of fortunes). I found it easier to quickly type
the instructions (I'm posting from a tiny, and not very powerful
laptop). It'd be handy if Google allowed sigs.

--
BR, Vladimir

Sometimes, too long is too long.
-- Joe Crowe

Mar 1 '06 #7
Keith Thompson wrote:
"Vladimir S. Oka" <no****@btopenworld.com> writes:
[...]
Also, quote what and who you're replying to. If you use Google, click
Show Options and then Reply that appears below headers. It works, and
is good manners 'round here.


Vladimir, if you're going to give this advice, please consider also
citing <http://cfaj.freeshell.org/google/>. It explains the issue
more clearly than we can do here in a single post, and it also has a
number of useful links on Usenet etiquette.


Could it also be a good idea to direct people to c.l.c Wiki
(clc-wiki.net, I could remember this)? Or is it not mature enough yet?

--
BR, Vladimir

There was a young girl of Penzance
Who boarded a bus in a trance.
<censored>,
Likewise the conductor,
While the driver shot off in his pants.

Mar 1 '06 #8
> Vladimir S. Oka wrote:
voldemort wrote:
> > I meant to ask whether its possible to display 24 bits colour
> > pixels using assembly in C .
> > I was able to display 64K colours using assembly but failed to
> > display 24 bit colours because
> > probably my VESA card does'nt support this. But possibly I
> > could directly use the monitor
> > for the same without using any intermediate service. Anyone -
> > Please!

And how on earth do you think this is a question related to C?
Your original post actually might have been vaguelly topical in
the sense of the reply that Richard bothered to post elsethread.
Dragging assembly (not to mention graphic cards and monitors which
are not even software devices) into it makes it stratospherically
off-topic.

Also, quote what and who you're replying to. If you use Google,
click Show Options and then Reply that appears below headers. It
works, and is good manners 'round here.>thanks Vladimir. I am new to this & hence it will take time to
>>adapt. As far as this being a Qn. related to C , it definitely
>>is , since I am using C to implement it. But it also requires
>>the knowledge of h/w connected to the comp. The point is that
>>Windows uses the true color (16million) mode & if my monitor is
>>able to support that , then there must be a way by which the same
>>task is implemented using a language like C maybe by calling
>>the routines that Windows calls internally. After all this is
>>what is the advantage of C - being close to hardware. So is there
>>a way by which C can make use of subroutines that Windows
>>makes to be able to display ~16million colours.


You should have clicked the sole "Reply", not "Reply to Author". You're
lucky my e-mail address was real. I had to fish this out of my mail
client. ;-)

For a host of information about c.l.c, please have a look at
http://clc-wiki.net/, and for general posting guidelines when using
Google, at http://cfaj.freeshell.org/google/

Back to your post...

At least in c.l.c the fact that you use C to access graphics
capabilities of your hardware/OS does not make your questions
automatically topical. Yes, you generally access this functionality by
calling certain OS functions, but these are non-standard (i.e. not part
of the ISO Standard C), and off-topic here. They are topical in the
groups that deal with your OS or graphics libraries.

BTW, the benefit of C is not that it's close to the hardware. These days
it's mostly the fact that Standard C is available for almost any
hardware/OS combination you can imagine, thus making writing portable C
code much easier.

--
BR, Vladimir

Alas, I am dying beyond my means.
-- Oscar Wilde [as he sipped champagne on his deathbed]

Mar 1 '06 #9
Vladimir S. Oka wrote:
Keith Thompson wrote:
"Vladimir S. Oka" <no****@btopenworld.com> writes:
[...]
Also, quote what and who you're replying to. If you use Google, click
Show Options and then Reply that appears below headers. It works, and
is good manners 'round here.

Vladimir, if you're going to give this advice, please consider also
citing <http://cfaj.freeshell.org/google/>. It explains the issue
more clearly than we can do here in a single post, and it also has a
number of useful links on Usenet etiquette.


Could it also be a good idea to direct people to c.l.c Wiki
(clc-wiki.net, I could remember this)? Or is it not mature enough yet?


I would say that the intro to CLC is fine hence the link in my sig, and
it has links to other useful resources. Other areas still need a lot of
writing.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Mar 5 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Doug Laidlaw | last post: by
1 post views Thread by Piotrek Stachowicz | last post: by
reply views Thread by Rui Oliveira | last post: by
5 posts views Thread by Jameson | last post: by
11 posts views Thread by Marge | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.