Note that there are some explanatory texts on larger screens.

plurals
  1. POReading Targa File. Missing Dark Colors?
    primarykey
    data
    text
    <p><strong>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</strong></p> <p>I am parsing a Targa (.tga) image file with code similar to that found at <strong>steinsoft.net/index.php?site=Programming/Code%20Snippets/Cpp/no8</strong></p> <p>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.</p> <hr> <p><strong>The Simple Print Code</strong></p> <pre><code>file.open( save ); //using while( tga.data[ i ] != NULL ) resulted in ~400,000 lines of garbage being appended for( unsigned i = 1; i &lt;= ( tga.width * tga.height * tga.byteCount ); i++ ) { if( tga.data[ i ] == NULL ) break; file &lt;&lt; ( int )tga.data[ i ] &lt;&lt; ","; if( ( i % 3 ) == 0 ) file &lt;&lt; "\n"; } file.close( ); </code></pre> <hr> <p><strong>Example</strong></p> <p>Dark : <strong>http://i.stack.imgur.com/qefIA.png</strong> : <a href="http://pastebin.com/8JeJwP2w" rel="nofollow">http://pastebin.com/8JeJwP2w</a></p> <p>Light : <strong>http://i.stack.imgur.com/XNTIK.png</strong> : <a href="http://pastebin.com/s2sW0XfM" rel="nofollow">http://pastebin.com/s2sW0XfM</a></p> <p>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]).</p> <p>Does anyone have any information on why this may be happening?</p> <hr> <p><strong>Specs</strong></p> <p>Windows Vista</p> <p>Microsoft Visual C++ 2010 Professional</p> <p>Targa is saved as 24-bit NOT compressed.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload