It would appear that my half-unthinking reply has set off a spew of totally unrelated posts... A correction follows...
On Wed, May 6, 2009 at 11:11 AM, Paul Herring <[email protected]> wrote: > On Wed, May 6, 2009 at 10:59 AM, Jos Timanta Tarigan > <[email protected]> wrote: >> >> hi, >> >> so im currently try to read a binary file and try to represent it in rgb >> image. i save the >> file into char[length] and then try to convert it to int to get 0-255 value. >> is it ok to do it >> explicitly eg. (int)thisChar ? > > In all likelihood, no. > >> i got an unexpected value and i wonder if that caused by it. > > If by unexpected you mean negative you perhaps need an array of > > unsigned char [length]; unsigned char myVariable[100]; > > instead of > > char[length]; char myVariable[100]; 100 used as an example. More posts to follow... -- PJH http://shabbleland.myminicity.com/com http://www.chavgangs.com/register.php?referer=9375
