function PasteImageTest
% PasteImageTest. 

m=imread('ShowtimePhotoTest.jpg','jpg');
fprintf('Read image from disk: ');
if ndims(m)<3
	fprintf('%dx%d image\n',size(m,1),size(m,2));
else
	fprintf('%dx%dx%d image\n',size(m,1),size(m,2),size(m,3));
end
copyimage(m);
mm=pasteimage;
if any(any(m~=m))
	fprintf('Copying image to the clipboard and back failed.\n');
else
	fprintf('Success! Image copied to the clipboard and back.\n');
end

if size(m,3)>1
	w=Screen(0,'OpenWindow',[],[],32);
else
	w=Screen(0,'OpenWindow');
end
Screen(w,'TextSize',36);
Screen(w,'PutImage',m);
Ask(w,'Click to exit');
Screen('CloseAll');
