From: Nathan Newsgroups: comp.os.msdos.djgpp Subject: DJGPP: seekg 8/16bit problem!!! Date: Wed, 12 Jan 2000 09:45:35 +0000 Organization: University College London Lines: 40 Message-ID: <387C4D3F.9624B646@ucl.ac.uk> NNTP-Posting-Host: psaurus.anat.ucl.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: uns-a.ucl.ac.uk 947669940 8552 128.40.53.42 (12 Jan 2000 09:39:00 GMT) X-Complaints-To: usenet AT ucl DOT ac DOT uk NNTP-Posting-Date: 12 Jan 2000 09:39:00 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello fellow DJGPP users, I've spent the last two weeks banging my head against a brick wall trying write a very simply piece of C++ code, my first ever, to strip the headers from medical image files (DICOM) and bunch them together. The code is attached. Now, it appears to work perfectly with 8bit images, but screws up the grey distribution given a 16bit image!!!... looks like isobars of 5 or 6 greys. What looked a very simply problem, i.e. skip and then copy, is now becoming a nightmare. By a process of elimination I've located the problem to seekg, which is used to skip the header length given matrix size etc. I have attached the code if anybody wants to take a look. My question is whether this problem is caused by the compiler DJGPP or some other limitation of seekg under DJGPP?. I would be grateful for any advice or fixes to my code, many thanks nathan -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Nathan Jeffery PhD Evolutionary Anatomy Unit Dept. of Anatomy & Developmental Biology Rockefeller Building, University Street University College London London WC1E 6JJ UK tel: 0171-209-6215 fax: 0171-209-0346 email: ucgansj AT ucl DOT ac DOT uk http://evolution.anat.ucl.ac.uk/people/nathan/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~