From: Alper Akçan (distch@hotmail.com)
Date: Sun 06 Jan 2002 - 02:47:59 IST
I have wrote an ugly readbmp.c .h for reading bmp files, and a function to show them on svgalib. it is based on Dr. Dobbs BMP example source. worked fine for me, may be usefull. simple code is included as attachment. simply; gcc -o main main.c readbmp.c -lvgagl -lvga; ./main int gl_showbmpfile(char *file, int x, int y, int xo, int yo, int w, int h) * (x,y) * o--------------------------------- w * | * | (xo,yo) * | o------ w * h | h | * | | * | * | * Usage is like gl_putboxpart. * * If you like to show image, at position (x,y), as it is; * gl_showbmpfile(char *file, x, y, NULL, NULL, NULL, NULL); * * Or to show some part of the image to the ends of its dimentions * at position (x,y); * gl_showbmpfile(char *file, x, y, xo, yo, NULL, NULL); * * Last, to show some part of the with w, h at position (x,y); * gl_showbmpfile(char *file, x, y, xo, yo, w, h); Alper.
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST