Date: Thu, 16 Apr 1998 10:07:30 +0300 (IDT) From: Eli Zaretskii To: Henri Ossi cc: djgpp AT delorie DOT com Subject: Re: Fopen() and EOF In-Reply-To: <6h2ljv$72g$1@hiisi.inet.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 15 Apr 1998, Henri Ossi wrote: > I'm trying to read a pic, which is raw data. (pixel color from 0 to 255) > So the pixel color is used as the ASCII number. > > But if the pixel is 26, fopen reads the character, which is Ctrl-Z, as EOF. > > There must be a way to round this. You need to open the file in binary mode.