<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>16bit HSV image tech - fun in 16bit!</title>
		<link>http://www.allegro.cc/forums/view/587201</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 29 Aug 2006 17:14:36 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
In this thread:<br /><a href="http://www.allegro.cc/forums/thread/587163">http://www.allegro.cc/forums/thread/587163</a></p><p>There was a little discussion about using a 16bit HSV format for storing images. The general consensus seemed to be you couldn&#39;t get good results from this. Since I had some free time yesterday I worked on my own version and have the results now! I gave myself some rules first:</p><p>1) Dithering is allowed.<br />2) Fixed colour space, i.e. no analysing colours in the image.<br />3) No compression, 2 bytes per pixel.<br />4) Each 2 bytes contain data ONLY for that pixel.</p><p>This probably has no practical applications, but I love messing about with cool gfx stuff. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>Ok, I&#39;ve attached a little program which when unzipped will read the output.bmp file which is a 8bit image that is the same width as the original image, but has twice the height (hence 2 bytes per pixel). I&#39;ve attached the program and the data image to show I didn&#39;t cheat. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>The program reads in the image, converts it into 32 bit values and draws it to the screen. Although not perfect, I&#39;m pretty happy with the results! I&#39;ve tried it on several types of picture and it looks good so far.</p><p>If anyone&#39;s interested then I can go into detail of how I did it.</p><p>Test image:<br />Original = 67690 colours<br />Converted = 5232 colours.</p><p><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Thu, 24 Aug 2006 14:55:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you still worried that people will steal your code and make millions with it?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Thu, 24 Aug 2006 15:39:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
No, the code is a total mess, but I wasn&#39;t sure if people would be bothered about this tech idea anyway. Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Thu, 24 Aug 2006 16:01:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What&#39;s the point of this? Is it to reduce file size? In case it is, how does it compare to formats which store 32-bit data and compress it using lossless compression methods?</p><p>The girl looked good though. But I haven&#39;t got the original 32-bit image to compare with. It would be nice.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kentl)</author>
		<pubDate>Thu, 24 Aug 2006 16:04:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
It&#39;s just a fun technical exercise. There&#39;s not any real point as it&#39;s not designed for compression. As I said it follows on from the original posts in the thread I linked too.</p><p>Sometimes it&#39;s just fun to play with different gfx ideas. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Thu, 24 Aug 2006 16:17:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The bitmap image is way cooler lookin&#39; <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Billybob)</author>
		<pubDate>Thu, 24 Aug 2006 16:47:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
If I&#39;m going to do some gfx work with pictures I always prefer using a image of a good looking women. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Does anyone else have any good test pictures I can use? Something with different hues, areas of high &amp; low contrast, and degrees of saturation would be great. I&#39;d post the resulting picture here. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Thu, 24 Aug 2006 17:07:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Richard Phipps said:</div><div class="quote"><p>

Does anyone else have any good test pictures I can use? Something with different hues, areas of high &amp; low contrast, and degrees of saturation would be great.
</p></div></div><p>

Attatched is the image I used when testing the <a href="http://www.allegro.cc/depot/ChromaPlas">ChromaPlas</a> screensaver (which incidentally contains some very fast fixed-point RGB&lt;-&gt;HSV and RGB&lt;-&gt;HLS conversion algorithms). I don&#39;t know if it is the best possible test-image for fiddling with the HSV colour-space, but it&#39;s the one I used when testing ChromaPlas.</p><p>AE.</p><p>PS. Have you also tried <a href="http://en.wikipedia.org/wiki/HSL_color_space">HLS</a> as well as <a href="http://en.wikipedia.org/wiki/HSV_color_space">HSV</a>? Perhaps one is better suited to low resolution channel-values than the other (although I suspect that HSV can withstand lower bit-depths better because the HSV hex-cone only has one point whereas the HLS double-hex-cone has two points).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Fri, 25 Aug 2006 03:19:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Thanks Andrei! I&#39;m glad someone else is interested! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>I haven&#39;t tried HLS, though I&#39;m already using HSV. Not sure if there would be much of a difference.</p><p>Ok. Here is the Girl picture for people who didn&#39;t look at the program. The original 24bit image is on the right and the 16bit HSV version is on the left. Although there is some loss of quality, I think it&#39;s good considering it&#39;s only 2/3rds of the original information size.</p><p>http://www.zunked.org/Images/comparison.png</p><p>And here&#39;s the 16 bit HSV version of your picture Andrei. I shrunk it down 50% as it was a bit big for me. The original image was a bit dotty as well, but it still looks ok.<br />In fact it seems to cope with most colour situations pretty well.. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>http://www.zunked.org/Images/andrei.png
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Fri, 25 Aug 2006 03:28:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What does 16-bit RGB look like compared to the 16-bit HSV and 24-bit RGB original?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Billybob)</author>
		<pubDate>Fri, 25 Aug 2006 04:48:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What does 16-bit HSV look like without dithering?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 25 Aug 2006 05:53:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
I&#39;ve just had chance to test it. To be honest loading the image in a 16 bit mode with dithering in Allegro looks pretty similar to the HSV version. Some areas look better in 16RGB and others look a bit better in 16HSV. But overall, 16RGB looks better because of the reduced dithering.</p><p>Oh well! It was fun to play with this idea. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Fri, 25 Aug 2006 18:16:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Richard,</p><p>Do you mind if I use the code in my ChromaPlas screensaver? At the moment, it only does the HSV effects using 32-bit colour, but on my todo-list is to add 16-bit colour capabilities to ChromaPlas. 16-bit HSV resolution might just be enough to not have any noticable degradation of image-quality in 16-bit modes. Currently, ChromaPlas uses 11 bits for Hue, 8 bits for Saturation, and 8 bits for value (I should really use less bits for hue than I do for value, but because of the way my algorithm works, each hexcone-segment is 8-bits, and a span of 6 8-bit segments requires 11-bits).</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Mon, 28 Aug 2006 19:13:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Andrei,</p><p>The 16 bit HSV format I used was designed for output in a 24/32 bit screenmode, not a 16-bit one. Is that what you are planning to do? Because if you want it for a 16-bit screenmode then it would be better redesigning a new HSV format.</p><p>Rich.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Mon, 28 Aug 2006 19:22:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK then, I&#39;ll experiment with my own formats for output to 16-bit displays. How many bits per H,S and V channel did you use?</p><p>AE.</p><p>PS. As for the sample image I posted earlier, it was taken in Graceland. see <a href="http://www.allegro.cc/forums/thread/587215/609881#target">this post</a> for more details.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Mon, 28 Aug 2006 19:30:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
HSV: 637 with dithering. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>If you are outputting in 15/16 bit then you can only have 5 bits for value, so 655 might work well for you (without dithering).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Mon, 28 Aug 2006 19:59:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Posting pictures that allegedly show how well it works is like those old TV commercials advertising TV&#39;s.  &quot;Look how clear the picture is!&quot;.  You <u>can&#39;t</u> see it any better than your crappy old TV, snow and all.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Mon, 28 Aug 2006 23:47:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Er.. what? If you are viewing in a 32 bit screen mode we can see the original and the new 16bit version. <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Tue, 29 Aug 2006 00:07:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>From your picture, looks like saturation is being increased too much.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 29 Aug 2006 17:14:36 +0000</pubDate>
	</item>
</rss>
