Due to being new, I can only have two links and can not post my images. Sorry for the inconvenience of having to copy+paste addresses
I am parsing a Targa (.tga) image file with code similar to that found at steinsoft.net/index.php?site=Programming/Code%20Snippets/Cpp/no8
After retrieving the data into the unsigned char array, I print it out into a log to check manually. It seems that darker colors are not being parsed for whatever reason.
The Simple Print Code
file.open( save );
//using while( tga.data[ i ] != NULL ) resulted in ~400,000 lines of garbage being appended
for( unsigned i = 1; i <= ( tga.width * tga.height * tga.byteCount ); i++ )
{
if( tga.data[ i ] == NULL )
break;
file << ( int )tga.data[ i ] << ",";
if( ( i % 3 ) == 0 )
file << "\n";
}
file.close( );
Example
Dark : https://i.stack.imgur.com/qefIA.png : http://pastebin.com/8JeJwP2w
Light : https://i.stack.imgur.com/XNTIK.png : http://pastebin.com/s2sW0XfM
As you can see, the line at the top of the image is not included when it is a dark color (black in this instance), but it is there when it is light (a pink [255,53,204]).
Does anyone have any information on why this may be happening?
Specs
Windows Vista
Microsoft Visual C++ 2010 Professional
Targa is saved as 24-bit NOT compressed.