HOW TO CHANGE MULTIPLE JPG TO PNG IMAGES
15 views (last 30 days)
Show older comments
HOW TO CHANGE MULTIPLE JPG TO PNG IMAGES
2 Comments
Accepted Answer
Azzi Abdelmalek
on 29 May 2013
Edited: Azzi Abdelmalek
on 29 May 2013
f=dir('Yourfolder\*.jpg');
fil={f.name};
for k=1:numel(fil)
file=fil{k}
new_file=strrep(file,'.jpg','.png')
im=imread(file)
imwrite(im,new_file)
end
13 Comments
yasser
on 19 Apr 2021
When I use your code I found that error
Error using strrep
Char inputs must be row vectors.
Are there any explanation?
regards
More Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!