function ListaSimpla = prjCheckDir(Path);
% ListaSimpla = prjCheckDir(Path);
%
% parseaza Path in cautarea fisierelor imagine,
% pe care le intoarce in ListaSimpla
%
% nou quadra v.0.4, 02.11.2003
if nargin < 1 disp('ce director?'); end;
% sorteaza known types (tif, jpg, gif, etc.)
% 'jpg' or 'jpeg' Joint Photographic Experts Group (JPEG)
% 'tif' or 'tiff' Tagged Image File Format (TIFF)
% 'gif' Graphics Interchange Format (GIF)
% 'bmp' Windows Bitmap (BMP)
% 'png' Portable Network Graphics
% 'hdf' Hierarchical Data Format (HDF)
% 'pcx' Windows Paintbrush (PCX)
% 'xwd' X Window Dump (XWD)
% 'cur' Windows Cursor resources (CUR)
% 'ico' Windows Icon resources (ICO)
known_extensions = {'jpg', 'jpeg', 'tif', 'tiff', 'gif', 'bmp', 'png', 'hdf', 'pcx', 'xwd', 'cur', 'ico'};
iv = 0; FileList = dir(Path);
for i=3:size(FileList,1)
namelength = size(FileList(i).name,2);
base = FileList(i).name; extension = '';
if (namelength > 4) & ~(FileList(i).isdir)
p=namelength;
% - recunoaste extensia & radacina
while p>0
p=p-1;
if strcmp(FileList(i).name(p),'.')
base = FileList(i).name(1:p-1);
extension = FileList(i).name(p+1:namelength);
switch lower(extension)
case 'tiff'
type = 'tif';;
case 'jpeg'
type = 'jpg';
otherwise
type = lower(extension);
end;
break;
end;
end;
if sum(strcmp(type,known_extensions))
iv = iv+1; ListaSimpla(iv) = uConstr('listasimpla');
ListaSimpla(iv).name = FileList(i).name;
ListaSimpla(iv).path = Path;
end;
end;
end;
if ~exist('ListaSimpla')
% ListaSimpla = uConstr('listasimpla');
ListaSimpla = [];
disp('no image files found in specified directory');
end;