function writePCX %WRITEPCX Write the image in a pcx file format % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global savepath Handlefig Handleimg [name, path] = uiputfile([savepath '*.pcx']); if ~isempty(name) & name ~= 0 f=watchon; statusbar('Writing PCX file...'); PCXname = [path name]; ex=findobj('tag', 'EXP_TYPE'); if onoff(get(ex, 'checked')) m=colormap; g=get(Handleimg, 'cdata'); else figure(Handlefig); drawnow; [g,m] = capture(Handlefig); end pcxwrite(g,m,PCXname); watchoff(f); clearstatusbar; end return