   Loading .jpg-files... how?
  Hello Untill now I used to load .bmp-files as textures, but now I want to change to .jpg.Perhaps someone could show me a little tutorial with a code to load this? Or perhaps a link?Or perhaps someone could tell me another good graphics format for the use as textures Thanks in advance... 
  try googling through for something like "jpeglib" it is free. ;  ISTR that jpg compression uses a fun combination of block based fourier transforms and diagonal rle runs to compress data - making it a bit mathematical and not the easiest file format to decode.  That said, this site is a pretty good place to start if you're interested in learning about any given file format. Some of the articles also contain source code.EDIT ^^^^ or just use a pre-written library....  [edited by - Sandman on February 4, 2004 7:53:13 AM];  i think it also depends on your platform.i have used win32 apis and some wgl-extensions to load .jpgs with realative ease.if you are not caring for mac or lnx, i could send some source your way... ---craig(at)cod3rz(dot)net ;  This is a JPEG loader from the helpful chaps over at www.gametutorials.com: TextureMapping3_OGL.zip. I''m not sure how well it works, as I haven''t had the need to use it yet (I''m content with TGAs for the moment), but based on other tutorials they''ve written, it should be just what you''re looking for...   Windows 95 - 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can''t stand 1 bit of competition. ;DevIL handles many types of image formats, and is especiallyeasy to use with OpenGL, since the syntax is very similar.   Kami no Itte ga ore ni zettai naru! ;  sdl (simple directmedia layer), if you like it, has a SDL_Image library that will load (png, jpg, bmp, tga, ...) in about 5 lines of codehttp://www.libsdl.org/another method is to use the libjpeg code as aforementionedi suggest you don''t write it yourself unless you have to, it takes about 8,000-10,000 lines of c code;  Hallo Thanks for the posts, I''ll have a look a gametutorials, sounds interesting (they use the jpeglib).Should my programm be able to load other graphic formats as texture than bmp, tga and jpeg? If bmp and tga weren''t that big I would prefer to drop jpg, but there isn''t really an alternative in low-size-images, or? ;  For non-photographic textures (i.e. fonts, gui components etc) I would recommend you use PNG.Enigma ;  I''ve just read the pages about PNG, but somehow it seems unfinished to me...I always have to include zlib for uncompression, the TODO list is somehow big... in my opinion it''s at the moment not really a good choice, perhaps later...Later I''ll have a look at jpg again, for the first other things are more important (as I can load bmp''s and tga''s it''s enough for the first )But thanks to everybody, who replied 