From: "YUBS" Newsgroups: comp.os.msdos.djgpp Subject: EUREKA... note about pcx header Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Tue, 10 Aug 1999 21:55:47 GMT NNTP-Posting-Host: 24.65.39.101 X-Complaints-To: abuse AT home DOT net X-Trace: news1.rdc2.on.home.com 934322147 24.65.39.101 (Tue, 10 Aug 1999 14:55:47 PDT) NNTP-Posting-Date: Tue, 10 Aug 1999 14:55:47 PDT Organization: @Home Network Canada To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com EUREKA! I finally sucessfully read the info from the pcx header properly. yeah I know it may not be a big deal to you, but I just thought I'd pass on a note about the header format for anyone else who may run into the same problem as I did. Ya see, everywhere I looked, the co-ordinates of the image (ie the top left and bottom right corner co-ordinates) where said to be stored as integers. Now an integer is 2-bytes yes??..., well, maybe... but if you're running on some systems (ie win 95/98) an integer is actually 4 bytes, and hence the reason C has a "short" variable type. So, you can see my problem then that I was reading the header trying to get a integer when in reality (on my system) I was looking for a short. The result was that I was actually reading both x1 and y1 into one co-ordinate which needless to say is not a good thing. So, in the hopes that no one else will make this silly mistake I thought I'd point out that although even the official specs for the pcx header say "all information that is two bytes is of int length" that isn't necessarilly true. Anyway, I'd just like to thank the people who took the time to try to help me. Although in the end it was fiddling which came up with the answer I appreciate your help... bye... -Josh de Bever