Path: chuka.playstation.co.uk!news From: Chris Chadwick Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: TIM Files Date: Wed, 28 May 1997 00:04:35 -0700 Organization: PlayStation Net Yaroze (SCEE) Lines: 64 Message-ID: <338BD903.2BCE@dial.pipex.com> References: <01bc6a20$ed0421e0$98a1cdcd@default> NNTP-Posting-Host: an140.du.pipex.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I; 16bit) Nelson Santos wrote: > > Hi all. > > I wrote the following small program to extract some information about a > certain TIM file I want to display: > > //----------------------------------------- > #include > > #define PICTURE 0x80110000 > > void main(void) > { > GsIMAGE Image; > GsGetTimInfo((u_long *)PICTURE,&Image); > printf("Pixel Mode: %u\n",Image.pmode); > printf(" Pixel X: %u\n",Image.px); > printf(" Pixel Y: %u\n",Image.py); > printf(" Pixel *: %x\n",Image.pixel); > printf(" CLUT CX: %u\n",Image.cx); > printf(" CLUT CY: %u\n",Image.cy); > printf(" CLUT CW: %u\n",Image.cw); > printf(" CLUT CH: %u\n",Image.ch); > printf(" CLUT *: %x\n",Image.clut); > } > //----------------------------------------- > > This is the output produced: > > Pixel Mode: 16 > Pixel X: 22540 > Pixel Y: 2 > Pixel *: 80110010 > CLUT CX: 17 > CLUT CY: 4294963200 > CLUT CW: 8192 > CLUT CH: 0 > CLUT *: 2000 > > Aside from "Pixel Mode" and "Pixel *", the rest of these values make NO > SENSE to me. "Pixel Mode", according to the Library Reference Page 30, > should be between 0 and 4. I'm getting 16. I'm assuming this means 16 bit > and there is an error in the Library Reference. > > HELP! Please clarify the rest of these numbers for me! Thanks! > > Nelson. Hi Nelson, I had a similar problem with values returned from GsGetTimInfo() a few weeks ago and it was driving me *guzNUTS* until I found the solution (in the manual of all places :) ... You need to initialize the graphics system with GsInitGraph() before using GsGetTimInfo() - none of the 'Gs' graphics functions work correctly until this is done! (see page 101 of Library Ref). This should solve it. Cheers! Chris Chadwick