% GUIoutputfig
% Function for the MODIS GUI
% Copyright by Jasmine S Nahorniak, Oregon State University.
% Mar 3 2000

function GUIoutputfig(outtype);

GUIdefaults;

if length(outtype<=2),
   outext=outtype;
else
   if outtype(1:2)=='jp',
      outtype='jpeg95';
      outext='jpg';
   else
      outext=outtype(1:3);
   end
end

[figfile,figpath]=uiputfile([guioutpath '*.' outext],'Save as:');

set(gcf,'InvertHardCopy','off')
%pappos=get(gcf,'PaperPosition');
%set(gcf,'PaperPosition',[pappos(1) pappos(2) pappos(3)/2 pappos(4)/2])
set(gcf,'PaperPositionMode','auto');

if figfile~=0,   % cancel button not hit   
   eval(['print -d' outtype ' ' figpath figfile]);
end


