For batch image conversion from jpg to bmp, I workon the following code but it faces with some errors:
f=dir('./input')
fil={f.name};
for k=1:numel(fil)
file=fil{k};
new_file=strrep(file,'.jpg','.bmp');
im=imread(file);
imwrite(im,new_file);
end
the errors:
Error using imread>get_full_filename (line 513)
Cannot open file "." for reading. You might not have read permission.
Error in imread (line 340)
fullname = get_full_filename(filename);
Error in format_conversion (line 6)
im=imread(file);
Where is the problem?