[b758a2]: / matlab / bmp2png.m

Download this file

11 lines (9 with data), 258 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
function bmp2png(folder)
listing = dir([folder '*.bmp']);
for i=1:size(listing)
infile = [folder listing(i).name];
[pathstr, name, ext] = fileparts(infile);
outfile = [pathstr '/' name '.png'];
A = imread(infile);
imwrite(A,outfile)
end