Date: Tue, 12 Aug 1997 18:46:42 -0400 (EDT) From: Timothy Robb To: djgpp AT delorie DOT com Subject: pcx file class problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Hello, I'm trying to compose a pcx file class for my own use in another program I am writing and am having limited success. When reading in a very simple pcx file (test.pcx) and then display it in mode 13h it work fine. When I try a more complicated example (image.pcx) which will be used when the full application is completed (a program to generate fourier transforms of different apperature, read in from the pcx files) but the image is scretched and obscured. You can get the source from http://neutrino.phys.laurentian.ca/~trobb/pcx.zip or http://www.geocities.com/SiliconValley/Vista/7489/pcx.zip The problem pcx file is image.pcx Here is some of my diagnostic output (rle decompression removed). Start : 0 After header : 128 Offset : 9200 After data : 6264 After fseek(fp, -786L, SEEK_END) : 6269 <- see note After palette : 7037 After fseek(fp, 0L, SEEK_END) : 7037 feof : 0 Note: One question is what are those missing 5 bytes for? When you run driver you'll see the two images displayed, which should both be the same thing. The upper is the buffer which the pcx file was decompressed to (too be removed after the class is completed) and the second is with a overloaded operator[] the buffer is copied to. Any help will be apprecieted. Timothy Robb