


IMPIC(3IM)             SDSC IMAGE LIBRARY              IMPIC(3IM)



NAME
     impic - PIXAR PIC file translation

SYNOPSIS
     #include <stdio.h>
     #include "sdsc.h"
     #include "im.h"

     int ImFileRead( fd, "pic", flagsTable, dataTable )
          int         fd;
          TagTable   *flagsTable;
          TagTable   *dataTable;

     int ImFileFRead( fp, "pic", flagsTable, dataTable )
          FILE         *fp;
          TagTable   *flagsTable;
          TagTable   *dataTable;

     int ImFileWrite( fd, "pic", flagsTable, dataTable )
          int         fd;
          TagTable   *flagsTable;
          TagTable   *dataTable;

     int ImFileFWrite( fp, "pic", flagsTable, dataTable )
          FILE         *fp;
          TagTable   *flagsTable;
          TagTable   *dataTable;


DESCRIPTION
     pic image files are generated by PIXAR programming software,
     such  as  ChapVolumes and ChapReyes, the PIXAR Image Runtime
     Library called Pirl, and the PIXAR rendering tool RenderMan.
     See  the  PIXAR  documentation set for details on how to use
     these applications and tools.

     PIXAR's pic file format is sometimes referred to as PICIO in
     PIXAR documentation.  pic and PICIO mean the same thing.

     PIXAR's xpic is not the same as pic and is _n_o_t supported  by
     the SDSC image library.

     _N_o_t_e:  PIXAR's RenderMan always saves its image  files  with
     .pic  filename  suffixes.   However,  depending  upon output
     defaults, RenderMan can generate .pic files with PICIO (same
     as  pic)  data or TIFF data.  .pic files with TIFF data will
     confuse the SDSC image library.  For you to avoid generating
     this type of file, we recommend that you configure RenderMan
     defaults to generate .pic files with PICIO data.

FILE RECOGNITION
     PIXAR pic files are recognized  by  the  following  filename



SDSC              Last change: August 24, 1992                  1






IMPIC(3IM)             SDSC IMAGE LIBRARY              IMPIC(3IM)



     suffixes:  .pic, .picio, and .pixar.

NOTES
     SDSC image library support of the PIXAR pic format does  not
     require  use  of  PIXAR's  tools, libraries, or hardware and
     contains no proprietary code.  PIXAR pic format handling  is
     available on any machine for which the SDSC image library is
     available.

  Reading PIXAR image files
     The SDSC image library can read PIXAR pic files and map them
     to VFBs as follows:

          Depth/color        Type of compression   Mapped to VFB
          8-bit R            Dump and encoded      IMVFBINDEX8 without CLT
          12-bit R           Dump and encoded      IMVFBINDEX16 without CLT
          24-bit RGB         Dump and encoded      IMVFBRGB without CLT
          36-bit RGB         Dump and encoded      IMVFBRGB without CLT
          32-bit RGB-Alpha   Dump and encoded      (IMVFBRGB | IMVFBALPHA) without CLT
          48-bit RGB-Alpha   Dump and encoded      (IMVFBRGB | IMVFBALPHA) without CLT

     Single-channel images in 8-  and  12-bit  depths  store  the
     channel's  data  as  the  red  image  channel.  The pic code
     treats such images as grayscale images without color  lookup
     tables (CLTs).

     Dump format images are stored uncompressed;  encoded  format
     images  are  stored  using  a  variant of run-length-encoded
     (RLE) compression.

     A PIXAR pic image can be represented in files as a series of
     tiles,  each one containing a part of the image.  Such image
     tiling is _n_o_t supported by the SDSC image library.

     _N_o_t_e:  RGB images with 12-bit data  channels  (i.e.,  36-bit
     RGB and 48-bit RGB-Alpha) are reduced to 8-bit data channels
     when read in.

  Writing PIXAR image files
     SDSC image library VFBs are written to pic files as follows:

          Mapped from VFB           Depth/color        Type of compression
          IMVFBINDEX8               8-bit R            dump and encoded
          IMVFBINDEX16              8-bit R            dump and encoded
          IMVFBRGB                  24-bit RGB         dump and encoded
          (IMVFBRGB | IMVFBALPHA)   32-bit RGB-Alpha   dump and encoded

     None of the output formats supports storing a CLT  with  the
     image in the file.

     Other image library VFB types, or VFBs with CLTs,  are  con-
     verted to one of the above types prior to being written out.



2                 Last change: August 24, 1992               SDSC






IMPIC(3IM)             SDSC IMAGE LIBRARY              IMPIC(3IM)



     See the ImFileWrite(3IM) man page for details.

     In  SDSC  image  library   terminology,   dump   files   are
     uncompressed;  encoded  files  use  a variant of run-length-
     encoded (RLE) compression.

     RGB and RGB-Alpha images are  always  stored  non-interlaced
     (i.e.,  RGBRGBRGB...).  Scanline- and plane-interlaced modes
     are not supported.

ERRORS
     In addition to those listed for ImFileRead(3IM),  PIXAR  pic
     file reading returns the following error codes:

          IMEMAGIC    Bad magic number in image file
          IMEMALLOC   Cannot allocate enough memory
          IMESYNTAX   Unknown image type, mode, or multiple tiles
          IMESYS      System call error in read operation

     In addition to those listed for ImFileWrite, PIXAR pic  file
     writing returns the following error codes:

          IMEMALLOC   Cannot allocate enough memory
          IMESYS      System call error in write operation

DOCUMENTATION
     _P_I_X_A_R _I_m_a_g_e _C_o_m_p_u_t_e_r _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l, PIXAR.

     _P_I_X_A_R _I_m_a_g_e _C_o_m_p_u_t_e_r _C_h_a_p_L_i_b_r_a_r_i_e_s _U_s_e_r'_s _G_u_i_d_e, PIXAR.

     _T_h_e _R_e_n_d_e_r_M_a_n _C_o_m_p_a_n_i_o_n, Steve Upstill, PIXAR.

SEE ALSO
     ImIntro(3IM),   ImErrNo(3IM),   imconv(1IM),    imfile(1IM),
     imformats(1IM)

AUTHOR
     Jim McLeod
     San Diego Supercomputer Center

CONTACT
     SDSC consultants, (619)534-5100, consult@y1.sdsc.edu













SDSC              Last change: August 24, 1992                  3



