Is there any way i can display any image files (any extension) in C??
I heard that bitmap files can be displayed. Can anyone tell me how?
Is there any way i can display any image files (any extension) in C??
I heard that bitmap files can be displayed. Can anyone tell me how?
Where do want them displayed and for what purpose? This is some specific system library stuff I think, so the method depends on the OS.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
You can...only if you honour the cabbage
=========================================
Everytime you segfault, you murder some part of the world
You can 'create' greyscale .pgm images using c, provided you already have a file for the image to be created to, in the same directory as the executable. I think you can do simialr things with coloured bitmaps, but not sure.
PHI is one 'H' of alot more interesting than PI!
Of course you can create / edit / whatever bitmaps. It's basically just mathematical formulas.
Anyhow, you will probably want/need 3rd party libraries for that, seeing as it's complex.
The OS will do the job of displaying it on the screen for you.
You can create color bitmaps such as .xpm images using a text editor, and convert them to anything else using a system command. They are pure text files -- go look. So a simple C program to do the same thing would make it even easier.
However, that's different issue than actually displaying them.
Last edited by MK27; 02-20-2009 at 08:26 AM.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
I thought it was possible, but never actually tried it myself, seems an obvious enough extension of being able to read/write .pgm images though.
OP: If you want to program a GUI in c, then you can use GTK toolkit, and there is probably ways of creating and displaying images within that, but I'm not sure exactly what you mean by displaying an image.
PHI is one 'H' of alot more interesting than PI!
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge