does pasteimage.mex fail?

dear geoff and other users of PasteImage

on 8/1/00 you reported a problem with pasteimage:

> BUG & WORK AROUND:
>
> PasteImage fails with some, but not all, images copied to the
> clipboard from Adobe Photoshop. Copying the image from the clipboard
> into another application (e.g. Microsoft Word) and then from that
> application to the clipboard, usually works. (Guessing as
> to the cause, it's possible that Photoshop is embedding the
> picture's ICC profile into the picture's comment, making the picture
> odd in a way that PasteImage ought to but doesn't cope with, and
> that Word is stripping the profile out. Embedding the ICC profile is
> generally considered a good thing, enhancing the reproducibility of
> the image, but, if this diagnosis is right, PasteImage isn't coping
> with it.) Reported by Geoff Loftus 8/1/00.

I just looked into the code for PasteImage.mex to see if we could fix
this. The code looks fine. I tried copying several images from
Photoshop into MATLAB, using
m=pasteimage;size(m)
and everything worked fine. the image looked fine when i displayed it
w=screen(0,'openwindow');screen(w,'putimage',m*255);

can you tell me how to reproduce the failure you reported? Also,
could you explain what you meant by "PasteImage fails"? Did it crash,
or did it complain, with an error message? Or did it just pass an
image that somehow wasn't quite right?

i'm using photoshop 6.01 under mac os 6.2.2.

best

denis
Interestingly, I have zero recollection of reporting this error. Are you sure it
was me? (A clue is that I have no idea what an ICC profile is).

Anyway, I do recall having troubles from time to time, but they were all due to
the dumb error of PasteImage'ing a 0-255 format uint8 image while Photoshop
wants a 0-1 format image.

Geoff

Geoffrey R. Loftus, PhD Office: (206) 543-8874
Department of Psychology Home: (206) 547-6969
Guthrie Hall, Room 131 Mobile: (206) 605-1974
University of Washington Fax: (206) 685-3157
Box 351525 Web: http://faculty.washington.edu/gloftus
Seattle, WA 98195-1525


----------
>From: Denis Pelli <denis.pelli@...>
>To: Geoff Loftus <gloftus@...>, psychtoolbox
<psychtoolbox@yahoogroups.com>
>Subject: [psychtoolbox] does pasteimage.mex fail?
>Date: Sat, May 4, 2002, 12:39 PM
>

> dear geoff and other users of PasteImage
>
> on 8/1/00 you reported a problem with pasteimage:
>
>> BUG & WORK AROUND:
>>
>> PasteImage fails with some, but not all, images copied to the
>> clipboard from Adobe Photoshop. Copying the image from the clipboard
>> into another application (e.g. Microsoft Word) and then from that
>> application to the clipboard, usually works. (Guessing as
>> to the cause, it's possible that Photoshop is embedding the
>> picture's ICC profile into the picture's comment, making the picture
>> odd in a way that PasteImage ought to but doesn't cope with, and
>> that Word is stripping the profile out. Embedding the ICC profile is
>> generally considered a good thing, enhancing the reproducibility of
>> the image, but, if this diagnosis is right, PasteImage isn't coping
>> with it.) Reported by Geoff Loftus 8/1/00.
>
> I just looked into the code for PasteImage.mex to see if we could fix
> this. The code looks fine. I tried copying several images from
> Photoshop into MATLAB, using
> m=pasteimage;size(m)
> and everything worked fine. the image looked fine when i displayed it
> w=screen(0,'openwindow');screen(w,'putimage',m*255);
>
> can you tell me how to reproduce the failure you reported? Also,
> could you explain what you meant by "PasteImage fails"? Did it crash,
> or did it complain, with an error message? Or did it just pass an
> image that somehow wasn't quite right?
>
> i'm using photoshop 6.01 under mac os 6.2.2.
>
> best
>
> denis
>
>
>
> http://psychtoolbox.org
> POST a message to: psychtoolbox@yahoogroups.com
> UNSUBSCRIBE by sending a blank message to:
> psychtoolbox-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>Interestingly, I have zero recollection of reporting this error. Are
>you sure it was me? (A clue is that I have no idea what an ICC
>profile is).
>
>Anyway, I do recall having troubles from time to time, but they were
>all due to the dumb error of PasteImage'ing a 0-255 format uint8
>image while Photoshop
>wants a 0-1 format image.

dear geoff

ok, thanks. the speculative comments about the icc profile mine, but
my notes indicate that the original report was from you.

since no one can reproduce the PasteImage bug, i'll take it off our
bug list. we're producing a new version that will be directly
compatible with SCREEN PutImage and GetImage, i.e. no more 0-1
scaling.

best

denis