iopen arguments

DanKarron at UCBVAX.BERKELEY.EDU DanKarron at UCBVAX.BERKELEY.EDU
Mon Apr 1 04:37:41 AEST 1991


Thanks for your response. I have been using my hacks for months and months, but
it was only recently that I thought I might check with you or the net for
what is the ``right way'' to do this.

Since the sgi machines (for the moment) have 8 bit dac's, any reference to
more than 1 bytes per pixel must be a color index reference. If sgi is planning
to use more than 8 bits gray scale, great ! I will keep that in mind in my
software. My correspondence with Forest Baskett indicate that that will not
happen in the near term, but X does use more than 8 bit pixels although it
compresses the range on the fly.

My problem is that for simple 2d image manipulation I rely on, or build on 
your code. I keep pixels in ipaste format so that I, and the sales demo programs
will run with native data . Now I read ipaste files and need the entire 12 bit
depth for 3d reconstruction and window the 8 bits resolution into the 
12 bit depth.

I got a note from davie blythe about this, and this is what I will do, and
if this is what you reccommend, fine.             

-------------------------------------------------------------------------------

I frequently use images with 12 bit pixels which are displayed using the colour
lookup table (aka cmode()).  This is what I pass to iopen() and I also call
setcolormap() afterwards to indicate it is a `SCREEN' image

    image = iopen(argv[2],"w",RLE(2),2,xsize,ysize,1);
    isetcolormap(image,CM_SCREEN);

I have seen other code with zsize set to 0, so I doubt it matters.  Most of the
imgtools work with SCREEN images (i.e. assemble,izoom,iflip,... but may not
set the output type to SCREEN properly (which you can fix in the source code
or use the command 'iset SCREEN file').  Some of the commands, however, do not
work with all SCREEN files e.g., hist ...

        david blythe
        ontario centre for large scale computation
        drb at clsc.utoronto.ca

Cheers!

dan.

| karron at nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
| Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
| 560 First Avenue                       Digital Pager <1> (212) 397 9330    |
| New York, New York 10016               <2> 10896   <3> <your-number-here>  |



More information about the Comp.sys.sgi mailing list