Copyright 1993,1994 David Clunie, Riyadh, Saudi Arabia.

PCD patch for XV 3.00 Release Notes 6 Jan 94.

Modified Mar 95 for XV 3.10a and to include in magpic patch by
ikeyan@airlab.cs.ritsumei.ac.jp <IKEMOTO Masahiro>.

These patches allow xv to read Kodak photocd files and choose which of the
5 available resolutions one wants to view.

It is pretty crude and was written quickly for a specific purpose and has
not really been cleaned up. It is poorly structured, full of debugging
codes and verbose comments, and there is very little attempt at optimizing
things. No profiling has been done.

There is not yet support for overview files, nor is there a facility to
use the higher resolution chroma planes from when viewing lower resolution
images. Colin Canfield (see below) has added support for the visual
schnauzer thumbnail and command line (which I never use so hadn't
bothered with). So for instance, one can now specify which resolution
to use from the command line, and hence do slide shows without the size
window popping up (happy now Pim ? :) )

It's only claim to fame is that it works and produces reasonable looking
images.

The outline of this is shamelessly derived from xvpbm.c to read the
file, and xvtiffwr.c to handle the popup window and X stuff (X never
has been my forte !), and the PhotoCD format information (though not
the code) was found in Hadmut Danisch's (danisch@ira.uka.de) hpcdtoppm
program in which he has reverse engineered the format by studying
hex dumps of PhotoCDs ! After all who can afford the Kodak developer's
kit, which none of us have seen yet ? Am I even allowed to mention these
words (Kodak, PhotoCD) ? I presume they are registered trade marks.

PS. I have no idea how Halmut worked out the YCC <-> RGB conversion
factors, but I have calculated them from his tables and the results
look good enough to me.

Sooner or later I will get around to trying to read overview files, using
the higher resolution chroma maps (what Hadmut calls "overskip"), and get
the colour tables right !

Feel free to send me comments or improvements, or even better, more
information about the photo CD format ... hopefully someone who really
knows what they are doing will tidy it up or do a neater job.

david (dclunie@flash.us.com) (now living in sunny Saudi Arabia !)

---------

The trace #define in xvpcd.c is now in the right place, and the ansi
prototype for the magnify function has been fixed. Colin made me switch to xvbcopy() which seems like a good idea for System V victims.

Still haven't fixed the colour tables. Supposedly they are a bit green. I
just bought a Mac so I thought I might run some photoCD images through
Adobe Photoshop and compare the colours with the xv patch. Stay tuned.

---------

Date: Wed, 22 Dec 1993 16:09:52 --1000
From: colinc@fitmail.fit.qut.edu.au (Colin Canfield )

I have done some more work using your patch I thought you might be intested in.
The major change was adding a size parameter to the LoadPCD; either -1 to mean
the popup or else the size you desired. This allows batch mode processing,
specifically xv -pcd <size> <filename>, and the visual schnauzer can work in 
quick mode (ie. you don't have to select each image size when it is building 
the icons)

I have added an xbm file for the file type but haven't drawn an icon for it,
this is in bitmaps/br_pcd.xbm. I will just send you the new files.

---------

I have modified for XV 3.10a and to include in magpic patch. I removed
HAVE_PCD symbol.

I have removed some unused valuables, and changed order of argument of
ULineString() function.

I have replaced XDrawString() function to DrawString() in DrawTD().

I have imported PARM() scheme and fix some prototype definition.

I have drawn a photocd icon, this is in bits/br_pcd.

	ikeyan@airlab.cs.ritsumei.ac.jp <ikeyan@airlab.cs.ritsumei.ac.jp>
