

currdir = dir;

for i = 1:length(currdir)
	
	
	jpgflag = strfind(currdir(i).name,'.jpg');
	
	if ~isempty(jpgflag)
		[rawim,cmap] = imread(currdir(i).name);
		
		%For NOAA Smoke Images
% 		cropim = rawim(308:385, 345:458);
		
		%For Iowa State Precipitation Images
% 		cropim = rawim(308:501, 261:522);
		
		imwrite(cropim,cmap,['cropped_',currdir(i).name(1:jpgflag-1),'.png'],'png');
		
		
		
		
	end
	
	
	
	
	
	
	
	
end