From: Trey Conley (svgalib@conleyfamilyonline.org)
Date: Wed 07 Feb 2001 - 15:19:06 IST
Yes, Jay. I did this. As a matter of fact, I am using Listing 9.3 from your book exactly except that I changed the resolution to 640x480. Trey -----Original Message----- From: Jay Link [mailto:jlink@ilbbs.com] Sent: Tuesday, February 06, 2001 10:39 PM To: TC Cc: linux-svgalib@svgalib.org Subject: Re: Please Explain > The image displayed, but it looks as if it is shifted down a couple of > pixels and right 10 pixels or so. There is a small border the color of > pallette color 0 across the top and down the left hand side. Why isn't it > filling up the entire screen? You probably need to "synch" the screen's color palette with the colors in th .GIF . Since you are using liblug, try doing something like this: int i, r, g, b; byte *ptr; bitmap_hdr file; read_lug_file("conley.gif", &file); for (i = 0, ptr = file.cmap; i < file.colors; i++) { r = (double)*ptr++; g = (double)*ptr++; b = (double)*ptr++; gl_setpalettecolor(i, r>>2, g>>2, b>>2); } gl_putbox(0, 0, file.xsize, file.ysize, file.r); HTH, -Jay ------------------------------------------------------------------ Unsubscribe: To: listbot@svgalib.org Body: unsubscribe linux-svgalib
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST