how to convert multiply jpg files to tiff
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey,
I am new to matlab, I tried to convert multiply jpg files to tiff files, with no success.
I know i need to use this lines:
img = imread('FileName.jpg');
imwrite(img, 'FileName.tiff');
But how do I do that with multiply images.
thanks for the help
0 commentaires
Réponse acceptée
KSSV
le 22 Fév 2022
jpgFiles = dir('*.jpg') ; % you are in the folder of all jpg files/ you may provde path as well
N = length(jpgFiles) ;
for i = 1:N
% Read
FileName = jpgFiles(i).name ;
img = imread(FileNAme);
% Write
[~,FileName,ext] = fileparts(FileName) ;
OutFile = strcat(FileName,'.tiff') ;
imwrite(img,OutFile);
end
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur String Parsing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!