how to convert the format of images from '.jpg' to '.tif' format. Images are stored in a folder
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
i have a folder with 5000 images from '00001art.jpg' to '05000art.jpg'. i want to convert these all images from '.jpg' format to '.tif' format.
help me please its urgent
Risposte (2)
filenames = ls([path '*.jpg']);
for i=1:size(filenames ,1)
this = strtrim(filenames (i,:));
temp = imread([path this]);
this = this(1:end-4);
imwrite(temp,[path this '.tiff'],'tiff');
end
Azzi Abdelmalek
il 23 Lug 2013
folder='D:/Matlab/' ;% For example
f=dir([folder '*.jpg']);
for k=1:numel(f)
old_file=f(k).name;
new_file=strrep(old_file,'jpg','tif')
im=imread([folder old_file])
imwrite(im,[folder new_file])
end
1 Commento
preet
il 29 Lug 2013
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!