> how can I learn to load JPG files in ANSI C?
ANSI C has functions to open, read ... files.
JPG files are also files.
--
________________________________________________
Parker Shaw | Make it correct
psh...@cs.auckland.ac.nz | Make it elegant
________________________________________________
> how can I learn to load JPG files in ANSI C?
>
>
<Jack>
You can open JPEG files for reading by using the "rb" mode string in a
call to fopen(). You can use functions like fgetc() and fread() to
read the contents into properly allocated memory. If you want to
manipulate the image data, you can find the format of JPEG files on
the Wotsit file format page at either of the links below:
http://www.wotsit.org
http://wotsit.simsware.com
If you want to display the image on a screen, you can't do this in
standard C at all because it does not define or provide any support
for graphics, video displays, or hardware of any kind.
You will have to resort to compiler or operating system specific
extensions, which you will need to ask about in a group which
discusses programming for your operating system or a support group for
your particular compiler.
</Jack>
--
Do not email me with questions about programming.
Post them to the appropriate newsgroup.
#> how can I learn to load JPG files in ANSI C?
# ANSI C has functions to open, read ... files.
Namely fopen() and fread(). Or for reading a character at a time, fgetc().
# JPG files are also files.
Reading Kenneth's question, I'm sure he knew this. However, if Kenneth
was interested in how to *display* them on a bit mapped output device,
the answer is system specific and should be asked in a platform
specific newsgroup.
Regards,
Jens
--
Jens Schweikhardt http://www.shuttle.de/schweikh/
SIGSIG -- signature too long (core dumped)