screen problem again -- more info

I posted a message yesterday about a problem I'm having displaying pictures
in matlab on one of the computers I'm using. Here is some more information.

Recap: I have a program that works on old iMacs (OS 9) and a PowerBook G4
(OS X), but is not working on another Mac computer (PowerMac, OS 9) that
has a separate monitor.

More Details:
The resolution is 1024x768, 75Hz, and when I went into the control panels, I
discovered that this is the ONLY option--I wasn't even allowed to downgrade
to a lower resolution. The computer displays either 256 colors or thousands,
but not millions.

The problem:
With the following code,

screenNumber = 0;
[window, screenRect] = screen(screenNumber, 'OpenWindow', bgcolor);

the program would crash, the screen would not open, and the error was that
this setting was not available. I assumed that the default (32 bits?) was just
something this computer did not support.

So, I specified the screen rect and the pixel size.

screenNumber = 0;
[window, screenRect] = screen(screenNumber, 'OpenWindow', bgcolor, [0 0
1024 768], 16);

The program ran...but the pictures were all messed up. They looked like
visual noise. You could only make out the shape and the colors used--
everything else was scrambled. Incidentally, the pictures are stored as 8-bit
jpegs. They're about as simple as I could make them.

I thought that maybe it would be better to specify the resolution instead of the
pixel size, because that is something that screen lets you do. I performed
ResoutionTest to see all of the computer's monitor details. Then, I performed
NearestResolution on this information, and stored that as a variable that I
entered into this part of the code (where I had entered pixelsize before). I got
the same problem where the pictures would display in a distorted manner.

res = NearestResolution(screenNumber, [1024, 768, 75, 16]);
screenNumber = 0;
[window, screenRect] = screen(screenNumber, 'OpenWindow', bgcolor, [0 0
1024 768], res);

Other information:
the numbers/letters I display in the program (between the instructions and the
stimuli) displayed perfectly. I was using imread to read the image, and
putimage to display it.

image = 'example.jpg';
imageArray=IMREAD(image,'jpg');
screen(buffer,'PutImage',imageArray); % ("buffer" is an offscreen window)

Any thoughts?