HOW TO CHANGE MULTIPLE JPG TO PNG IMAGES

33 views (last 30 days)
HOW TO CHANGE MULTIPLE JPG TO PNG IMAGES
  2 Comments
ajith
ajith on 13 Jun 2013
sorry for my mistake and also clarify that. i only ask my doubt regards the program sir

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
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
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

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type 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!