

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amigaos.net/w/index.php?action=history&amp;feed=atom&amp;title=RGBN_and_RGB8_IFF_Image_Data</id>
	<title>RGBN and RGB8 IFF Image Data - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amigaos.net/w/index.php?action=history&amp;feed=atom&amp;title=RGBN_and_RGB8_IFF_Image_Data"/>
	<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=RGBN_and_RGB8_IFF_Image_Data&amp;action=history"/>
	<updated>2026-05-13T20:37:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=RGBN_and_RGB8_IFF_Image_Data&amp;diff=2109&amp;oldid=prev</id>
		<title>Steven Solie: Created page with &quot;= RGBN and RGB8 =  &lt;pre&gt; RGB image forms, Turbo Silver (Impulse)                      FORM RGBN and FORM RGB8 		    -----------------------  	RGBN and RGB8 files are used in I...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=RGBN_and_RGB8_IFF_Image_Data&amp;diff=2109&amp;oldid=prev"/>
		<updated>2012-05-10T19:42:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= RGBN and RGB8 =  &amp;lt;pre&amp;gt; RGB image forms, Turbo Silver (Impulse)                      FORM RGBN and FORM RGB8 		    -----------------------  	RGBN and RGB8 files are used in I...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= RGBN and RGB8 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RGB image forms, Turbo Silver (Impulse)&lt;br /&gt;
&lt;br /&gt;
                    FORM RGBN and FORM RGB8&lt;br /&gt;
		    -----------------------&lt;br /&gt;
&lt;br /&gt;
	RGBN and RGB8 files are used in Impulse&amp;#039;s Turbo Silver and Imagine.&lt;br /&gt;
	They are almost identical to FORM ILBM&amp;#039;s except for the BODY chunk&lt;br /&gt;
	and slight differences in the BMHD chunk.&lt;br /&gt;
&lt;br /&gt;
	A CAMG chunk IS REQUIRED.&lt;br /&gt;
&lt;br /&gt;
	The BMHD chunk specfies the number of bitplanes as 13 for type RGBN&lt;br /&gt;
	and 25 for type RGB8, and the compression type as 4.&lt;br /&gt;
&lt;br /&gt;
	The FORM RGBN uses 12 bit RGB values, and the FORM RGB8 uses&lt;br /&gt;
	24 bit RGB values.&lt;br /&gt;
&lt;br /&gt;
	The BODY chunk contains RGB values, a &amp;quot;genlock&amp;quot; bit, and repeat&lt;br /&gt;
	counts.  In Silver, when &amp;quot;genlock&amp;quot; bit is set, a &amp;quot;zero color&amp;quot; is&lt;br /&gt;
	written into the bitplanes for genlock video to show through.&lt;br /&gt;
	In Diamond and Light24 (Impulse 12 &amp;amp; 24 bit paint programs),&lt;br /&gt;
	the genlock bit is ignored if the file is loaded as a picture&lt;br /&gt;
	(and the RGB color is used instead), and if the file is loaded&lt;br /&gt;
	as a brush the genlock bit marks pixels that are not part of&lt;br /&gt;
	the brush.&lt;br /&gt;
&lt;br /&gt;
	For both RGBN and RGB8 body chunks, each RGB value always has a&lt;br /&gt;
	repeat count.  The values are written in different formats depending&lt;br /&gt;
	on the magnitude of the repeat count.&lt;br /&gt;
&lt;br /&gt;
	For the RGBN BODY chunk:&lt;br /&gt;
&lt;br /&gt;
		For each RGB value, a WORD (16-bits) is written: with the&lt;br /&gt;
		12 RGB bits in the MSB (most significant bit) positions;&lt;br /&gt;
		the &amp;quot;genlock&amp;quot; bit next; and then a 3 bit repeat count.  &lt;br /&gt;
		If the repeat count is greater than 7, the 3-bit count is&lt;br /&gt;
		zero, and a BYTE repeat count follows.  If the repeat count&lt;br /&gt;
		is greater than 255, the BYTE count is zero, and a WORD&lt;br /&gt;
		repeat count follows.  Repeat counts greater than 65536 are&lt;br /&gt;
		not supported.&lt;br /&gt;
&lt;br /&gt;
	For the RGB8 body chunk:&lt;br /&gt;
&lt;br /&gt;
		For each RGB value, a LONG-word (32 bits) is written:&lt;br /&gt;
		with the 24 RGB bits in the MSB positions; the &amp;quot;genlock&amp;quot;&lt;br /&gt;
		bit next, and then a 7 bit repeat count.&lt;br /&gt;
&lt;br /&gt;
		In a previous version of this document, there appeared the&lt;br /&gt;
		following line:&lt;br /&gt;
&lt;br /&gt;
		&amp;quot;If the repeat count is greater than 127, the same rules apply&lt;br /&gt;
		as in the RGBN BODY.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
		But Impulse has never written more than a 7 bit repeat count,&lt;br /&gt;
		and when Imagine and Light24 were written, they didn&amp;#039;t support&lt;br /&gt;
		reading anything but 7 bit counts.&lt;br /&gt;
&lt;br /&gt;
	Sample BODY code:&lt;br /&gt;
&lt;br /&gt;
			if(!count) {&lt;br /&gt;
				if (Rgb8) {&lt;br /&gt;
					fread (&amp;amp;w, 4, 1, RGBFile);&lt;br /&gt;
					lock = w &amp;amp; 0x00000080;&lt;br /&gt;
					rgb = w &amp;gt;&amp;gt; 8;&lt;br /&gt;
					count = w &amp;amp; 0x0000007f;&lt;br /&gt;
				} else {&lt;br /&gt;
					w = (UWORD) getw (RGBFile);&lt;br /&gt;
					lock = w &amp;amp; 8;&lt;br /&gt;
					rgb = w &amp;gt;&amp;gt; 4;&lt;br /&gt;
					count = w &amp;amp; 7;&lt;br /&gt;
				}&lt;br /&gt;
				if (!count)&lt;br /&gt;
					if (!(count = (UBYTE) getc (RGBFile)))&lt;br /&gt;
						count = (UWORD) getw (RGBFile);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
	The pixels are scanned from left to right across horizontal&lt;br /&gt;
	lines, processing from top to bottom.  The (12 or 24 bit) RGB&lt;br /&gt;
	values are stored with the red bits as the MSB&amp;#039;s, the green&lt;br /&gt;
	bits next, and the blue bits as the LSB&amp;#039;s.&lt;br /&gt;
&lt;br /&gt;
	Special note:  As of this writing (Sep 88), Silver does NOT&lt;br /&gt;
	support anything but black for color zero.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steven Solie</name></author>
	</entry>
</feed>