Subject: Re: XWD->Mac conversion...

From: [email-masked] (Andy Jacobson)
Date: Wed, 27 Jan 93 11:10:32 -0800

Hi,
Two questions. One, what is the actual format (if you know) of the .xwd
files? Two, what is the "Imagery" program on the mac?

I have the somewhat
complicated task of converting AVS image files ("image.x") to .PICT files
on the mac for our slide maker. My procedure is to convert the image file
to an RGB file (this is two steps, one image to ppm, and second ppm to rgb),
and then transport to the mac where I use Adobe Photoshop to read in the 
rgb file as raw (I have to set the extents, interleave, header to skip, etc).
and then output to .PICT. One of the reasons this isn't more straightfoward
is that AVS uses HSV instead of RGB colormaps. If there is a program that 
will take "image" format files and do the whole conversion to .PICT (whatever
that is supposed to be), I could really use it.
Thanks,
A. Jacobson
<[email-masked]>
UCLA Div. Nuclear Medicine / Dept. Pharmacology
CHS B2-086
UCLA School of Medicine
Los Angeles, CA 90024-1721

---

From: "A. Sheppard" <[email-masked]>
Date: Wed, 27 Jan 93 20:38:08 GMT

Andy Jacobson writes:

>what is the actual format (if you know) of the .xwd
>I have the task of converting AVS image files ("image.x") to .PICT files.
>My procedure is to convert the image file to an RGB file (this is two steps,
>one image to ppm, and second ppm to rgb), and then transport to the mac
>where I use Adobe Photoshop to read in the rgb file as raw (I have to set
>the extents, interleave, header to skip, etc) and then output to .PICT.
>One of the reasons this isn't more straightfoward is that AVS uses HSV
>instead of RGB colormaps. If there is a program that will take "image"
>format files and do the whole conversion to .PICT (whatever that is supposed
>to be), I could really use it.

Andy,

1. Imagery is available from most good Mac ftp archives, e.g. Sumex:

ftp sumex-aim.stanford.edu
get imagery-18.hqx                       <- the Imagery program
get imagery-jpeg-gif-conv-06.hqx         <- other stuff
get imagery-utils.hqx                    <- other stuff
exit

According to the manual, Imagery will translate the following formats
to PICT files:

IBM PC:  .PCX, .GL, .PIC, .CLP, .BMP, .IMG, .CUT, .TGA,
Amiga:   .IFF, .HAM
Unix/X:  .PPM, .PBM, .PGM, .XDO, .XBM, .XWD, .RAS, .GIF, .RLE
Mac:     MacPaint, .RIFF, Photoshop (8BIM) grey, RGB and CMYK, but not HSV :(

In addition, a "raw input format" is allowed, though I've never had to
try this so I can't really comment. To simplify your conversion slightly,
you could miss out the ppm->rgb conversion step and use Imagery to translate
the ppm file to PICT directly - I have tried this successfully a couple of
times in the past.

I have no experience with AVS, but could you just use "xwd" as I described while
running AVS ? There is really very little loss in quality in going from .xwd to
PICT files - in fact you won't believe it 'til you try it!

I don't have the .xwd file format immediately to hand (I'm typing on the Mac)
but it must be very simple. A 400x400 pixel file is 640106 bytes long, i.e.
4 bytes (400x400x4 640000) per pixel + some header information? Maybe other
readers can help with that.

Hope this is some use!

Andy Sheppard
[email-masked]