<?php header("Content-Type: text/html; charset=utf-8"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="GENERATOR" content="vim" />
   <meta name="Author" content="sam@zoy.org (Sam Hocevar)" />
   <meta name="Description" content="Caca Labs - img2oric" />
   <meta name="Keywords" content="libcaca, ASCII, ASCII ART, colour quantisation, dithering, oric" />
   <title>Caca Labs - img2oric</title>
   <link rel="icon" type="image/x-icon" href="/favicon.ico" />
   <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
   <link rel="stylesheet" type="text/css" href="/main.css" />
</head>

<body>

<?php include($_SERVER["DOCUMENT_ROOT"]."/header.inc"); ?>

<img src="oric.png" width="200" height="130"
     alt="Oric computer" style="float: left; border: 0px;" />

<p> <tt>img2oric</tt> converts images to the Oric screen format. The <a
href="http://www.defence-force.org/computing/oric/gallery/index.htm">Oric
screen format</a> is one of the most twisted standards and very little artwork
exists for this vintage computer. It was therefore the perfect challenge for
the Caca Labs image processing team. </p>

<p> The graphical part of the Oric screen has 240×200 pixels and can only
display 8 different colours (black, blue, red, green, cyan, magenta, yellow
and white). Each horizontal group of 6 pixels can only use two different
colours: the foreground and the background colours. The background <i>or</i>
the foreground colour may also be changed (one at a time), but while doing
so the next 6 pixels cannot be chosen: they will use the background colour
instead. Finally, a special bit may be activated to display the current group
of pixels in reverse video. </p>

<h2 style="clear: both;"> Downloads </h2>

<p> No real downloads are available yet. However, the file <tt><a
href="img2oric.c">img2oric.c</a></tt> may be compiled on Linux to obtain an
almost functional, yet extremely slow (around 2 minutes to process an image on
a modern computer) program. </p>

<h2> Usage </h2>

<p> <tt>img2oric</tt> will output to <tt>output.bmp</tt>, an image file
containing the new version, and to <tt>OUTPUT.TAP</tt> which contains the
Oric-format file. </p>

<p> You can download a <a href="OUTPUT.TAP">sample <tt>OUTPUT.TAP</tt></a>
file as generated by <tt>img2oric</tt>. To load it into an Oric
computer, or an emulator such as <tt>xeuphoric</tt>, just type
<b><tt>HIRES:CLOAD"OUTPUT"</tt></b> and it will be immediately displayed: </p>

<p style="text-align: center;">
  <img src="real-oric.jpeg" width="360" height="338" class="matrix" alt="" />
  <br />
  <span style="font-size: 60%"><i>photography courtesy of André Chéramy</i></span>
</p>

<h2> Screenshots </h2>

<p> These images show how <tt>img2oric</tt> performs. The results may not seem
terribly clean, but they are probably better than anything that has been seen
so far on an Oric computer. </p>

<p> These first 4 images show the results on the same images than the ones
on Dbug’s <a href="http://www.defence-force.org/computing/oric/coding/annexe_3/pictconv/">PictConv</a> website, to illustrate the improvements over the
traditional RGB separation technique. </p>

<p style="text-align: center;">
  <img src="buffy.png" width="240" height="200" class="inline" alt="" />
  <img src="output-buffy.png" width="240" height="200" class="inline" alt="" />
</p>

<p style="text-align: center;">
  <img src="mire.png" width="240" height="200" class="inline" alt="" />
  <img src="output-mire.png" width="240" height="200" class="inline" alt="" />
</p>

<p style="text-align: center;">
  <img src="dog.png" width="240" height="200" class="inline" alt="" />
  <img src="output-dog.png" width="240" height="200" class="inline" alt="" />
</p>

<p style="text-align: center;">
  <img src="lena.png" width="240" height="200" class="inline" alt="" />
  <img src="output-lena.png" width="240" height="200" class="inline" alt="" />
</p>

<p> The following images show <tt>img2oric</tt>’s results with grayscale
images and cartoon images. </p>

<p style="text-align: center;">
  <img src="bufbw.png" width="240" height="200" class="inline" alt="" />
  <img src="output-bufbw.png" width="240" height="200" class="inline" alt="" />
</p>

<p style="text-align: center;">
  <img src="homer.png" width="240" height="200" class="inline" alt="" />
  <img src="output-homer.png" width="240" height="200" class="inline" alt="" />
</p>

<p> The following images use real Oric artwork, taken from the Buggy Boy
and the VIP 4 demos: they are almost pixel-perfect. </p>

<p style="text-align: center;">
  <img src="bb.png" width="240" height="200" class="inline" alt="" />
  <img src="output-bb.png" width="240" height="200" class="inline" alt="" />
</p>

<p style="text-align: center;">
  <img src="eatme.png" width="240" height="200" class="inline" alt="" />
  <img src="output-eatme.png" width="240" height="200" class="inline" alt="" />
</p>

<p> And finally, this is an animation whose frames were converted to Oric
colours using <tt>img2oric</tt>: </p>

<p style="text-align: center;">
  <img src="bear.gif" width="240" height="200" class="inline" alt="" />
  <img src="output-bear.gif" width="240" height="200" class="inline" alt="" />
</p>

<h2> Credits </h2>

<p> <tt>img2oric</tt> was written by Sam Hocevar. Thanks to Jean-Yves
Lamoureux, Mickaël Pointier, Robert Chéramy, André Chéramy and Fabrice
Frances for their help, their work and the information they provided. </p>

<?php $rev = '$Id$';
      include($_SERVER['DOCUMENT_ROOT'].'/footer.inc'); ?>

</body>
</html>
