<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TGA mit Palette]]></title><description><![CDATA[<p>Ich schreib mir gerade meiner eigenen TGALader, und hab da mal eine Frage:<br />
Wie kriege ich die Palettengröße her, wenn PictureType = 1 (mit Palette, unkomprimiert) ist?<br />
Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171458/tga-mit-palette</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 10:22:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171458.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Jan 2007 15:10:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TGA mit Palette on Thu, 25 Jan 2007 15:10:00 GMT]]></title><description><![CDATA[<p>Ich schreib mir gerade meiner eigenen TGALader, und hab da mal eine Frage:<br />
Wie kriege ich die Palettengröße her, wenn PictureType = 1 (mit Palette, unkomprimiert) ist?<br />
Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1216954</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1216954</guid><dc:creator><![CDATA[Targa]]></dc:creator><pubDate>Thu, 25 Jan 2007 15:10:00 GMT</pubDate></item><item><title><![CDATA[Reply to TGA mit Palette on Thu, 25 Jan 2007 17:45:09 GMT]]></title><description><![CDATA[<pre><code>--------------------------------------------------------------------------------
DATA TYPE 1:  Color-mapped images.                                             |
_______________________________________________________________________________|
| Offset | Length |                     Description                            |
|--------|--------|------------------------------------------------------------|
|--------|--------|------------------------------------------------------------|
|    0   |     1  |  Number of Characters in Identification Field.             |
|        |        |                                                            |
|        |        |  This field is a one-byte unsigned integer, specifying     |
|        |        |  the length of the Image Identification Field.  Its range  |
|        |        |  is 0 to 255.  A value of 0 means that no Image            |
|        |        |  Identification Field is included.                         |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
|    1   |     1  |  Color Map Type.                                           |
|        |        |                                                            |
|        |        |  This field contains a binary 1 for Data Type 1 images.    |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
|    2   |     1  |  Image Type Code.                                          |
|        |        |                                                            |
|        |        |  This field will always contain a binary 1.                |
|        |        |  ( That's what makes it Data Type 1 ).                     |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
|    3   |     5  |  Color Map Specification.                                  |
|        |        |                                                            |
|    3   |     2  |  Color Map Origin.                                         |
|        |        |  Integer ( lo-hi ) index of first color map entry.         |
|        |        |                                                            |
|    5   |     2  |  Color Map Length.                                         |
|        |        |  Integer ( lo-hi ) count of color map entries.             |
|        |        |                                                            |
|    7   |     1  |  Color Map Entry Size.                                     |
|        |        |  Number of bits in each color map entry.  16 for           |
|        |        |  the Targa 16, 24 for the Targa 24, 32 for the Targa 32.   |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
|    8   |    10  |  Image Specification.                                      |
|        |        |                                                            |
|    8   |     2  |  X Origin of Image.                                        |
|        |        |  Integer ( lo-hi ) X coordinate of the lower left corner   |
|        |        |  of the image.                                             |
|        |        |                                                            |
|   10   |     2  |  Y Origin of Image.                                        |
|        |        |  Integer ( lo-hi ) Y coordinate of the lower left corner   |
|        |        |  of the image.                                             |
|        |        |                                                            |
|   12   |     2  |  Width of Image.                                           |
|        |        |  Integer ( lo-hi ) width of the image in pixels.           |
|        |        |                                                            |
|   14   |     2  |  Height of Image.                                          |
|        |        |  Integer ( lo-hi ) height of the image in pixels.          |
|        |        |                                                            |
|   16   |     1  |  Image Pixel Size.                                         |
|        |        |  Number of bits in a stored pixel index.                   |
|        |        |                                                            |
|   17   |     1  |  Image Descriptor Byte.                                    |
|        |        |  Bits 3-0 - number of attribute bits associated with each  |
|        |        |             pixel.                                         |
|        |        |  Bit 4    - reserved.  Must be set to 0.                   |
|        |        |  Bit 5    - screen origin bit.                             |
|        |        |             0 = Origin in lower left-hand corner.          |
|        |        |             1 = Origin in upper left-hand corner.          |
|        |        |             Must be 0 for Truevision images.               |
|        |        |  Bits 7-6 - Data storage interleaving flag.                |
|        |        |             00 = non-interleaved.                          |
|        |        |             01 = two-way (even/odd) interleaving.          |
|        |        |             10 = four way interleaving.                    |
|        |        |             11 = reserved.                                 |
|        |        |  This entire byte should be set to 0.  Don't ask me.       |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
|   18   | varies |  Image Identification Field.                               |
|        |        |  Contains a free-form identification field of the length   |
|        |        |  specified in byte 1 of the image record.  It's usually    |
|        |        |  omitted ( length in byte 1 = 0 ), but can be up to 255    |
|        |        |  characters.  If more identification information is        |
|        |        |  required, it can be stored after the image data.          |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
| varies | varies |  Color map data.                                           |
|        |        |                                                            |
|        |        |  The offset is determined by the size of the Image         |
|        |        |  Identification Field.  The length is determined by        |
|        |        |  the Color Map Specification, which describes the          |
|        |        |  size of each entry and the number of entries.             |
|        |        |  Each color map entry is 2, 3, or 4 bytes.                 |
|        |        |  Unused bits are assumed to specify attribute bits.        |
|        |        |                                                            |
|        |        |  The 4 byte entry contains 1 byte for blue, 1 byte         |
|        |        |  for green, 1 byte for red, and 1 byte of attribute        |
|        |        |  information, in that order.
|        |        |                                                            |
|        |        |  The 3 byte entry contains 1 byte each of blue, green,     |
|        |        |  and red.                                                  |
|        |        |                                                            |
|        |        |  The 2 byte entry is broken down as follows:               |
|        |        |  ARRRRRGG GGGBBBBB, where each letter represents a bit.    |
|        |        |  But, because of the lo-hi storage order, the first byte   |
|        |        |  coming from the file will actually be GGGBBBBB, and the   |
|        |        |  second will be ARRRRRGG. &quot;A&quot; represents an attribute bit. |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
| varies | varies |  Image Data Field.                                         |
|        |        |                                                            |
|        |        |  This field specifies (width) x (height) color map         |
|        |        |  indices.  Each index is stored as an integral number      |
|        |        |  of bytes (typically 1 or 2).   All fields are unsigned.   |
|        |        |  The low-order byte of a two-byte field is stored first.   |
|        |        |                                                            |
--------------------------------------------------------------------------------
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1217074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1217074</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Thu, 25 Jan 2007 17:45:09 GMT</pubDate></item><item><title><![CDATA[Reply to TGA mit Palette on Fri, 26 Jan 2007 19:29:27 GMT]]></title><description><![CDATA[<p>Ja danke, soweit war ich schon.<br />
Aber das Problem ist folgendes:<br />
Ich hab gerade ein Bild, mit Palette und unkomprimiert,<br />
BitsPerPaletteEntry = 24 (also je ein byte für B,G und R),<br />
und BytesPerPixel = 1.<br />
Da frag ich mich, wie das gehen kann, gibt BytesPerPixel in diesem Fall die Größe der Indexe in die Palette an oder wie ist das dann?<br />
Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1217763</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1217763</guid><dc:creator><![CDATA[Targa]]></dc:creator><pubDate>Fri, 26 Jan 2007 19:29:27 GMT</pubDate></item><item><title><![CDATA[Reply to TGA mit Palette on Sat, 27 Jan 2007 06:21:43 GMT]]></title><description><![CDATA[<p>ja, was sonst? wenn du pro pixel indizierst, ist jeder pixel nur so gross wie der index.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1217934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1217934</guid><dc:creator><![CDATA[rapso]]></dc:creator><pubDate>Sat, 27 Jan 2007 06:21:43 GMT</pubDate></item></channel></rss>