function convert(filename,filepath,mode)
%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.                                                                      

%---------------------------------------------------------------
%
%  converts files according to "mode" from 'startformat' to 'endformat'
%
%---------------------------------------------------------------

convertfenster = figure('Color',[0.8 0.8 0.8], ...
	'Position',[269 455 475 166], ...
	'Tag','Fig1');

startlabel = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[50.25 100 78.75 18.75], ...
	'String','Start', ...
	'Style','text', ...
	'Tag','StaticText1');
ziellabel = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[222 100 78.75 18.75], ...
	'String','Ziel', ...
	'Style','text', ...
   'Tag','StaticText1');

startformatlist = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[72.75 66 84.75 23.25], ...
	'String','startformat', ...
	'Style','popupmenu', ...
	'Tag','PopupMenu1', ...
   'Value',1);
zielformatlist = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[268.5 64.5 80.25 23.25], ...
	'String','zielformat', ...
	'Style','popupmenu', ...
	'Tag','PopupMenu1', ...
	'Value',1);




aufloesunglabel1 = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'Position',[12 39 57 21], ...
	'String','', ...
	'Style','text', ...
	'Tag','StaticText2');
aufloesunglabel2 = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'Position',[187.5 39 57 21], ...
	'String','Jpeg-Qualität', ...
	'Style','radio', ...
   'Tag','StaticText2');
startaufloesunglist = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[73.5 39 84 20.25], ...
	'String','', ...
	'Style','text', ...
	'Tag','PopupMenu2', ...
   'Value',1);
zielaufloesunglist = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[268.5 37.5 80.25 23.25], ...
	'String','zielauflösung', ...
	'Style','slider', ...
	'Tag','PopupMenu1', ...
	'Value',1);




formatlabel1 = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[12 64.5 30 23.25], ...
	'String','Format', ...
	'Style','text', ...
   'Tag','StaticText2');





formatlabel2 = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[187.5 64.5 30 23.25], ...
	'String','Format', ...
	'Style','text', ...
	'Tag','StaticText2');

okbutton = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[10.5 10 165 23.25], ...
	'String','ok', ...
	'Style','pushbutton', ...
	'Tag','okbutton', ...
   'Value',1);
abbrechenbutton = uicontrol('Parent',convertfenster, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[185.5 10 165 23.25], ...
	'String','abbrechen', ...
	'Style','pushbutton', ...
	'Tag','abbrechenbutton', ...
	'Value',1);

ok
