How to save in another folder under same name in another directory
Show older comments
Hi,
I opened my image in folder called experiment and did some image processing. I wish to save my edited image in another folder known as edited under the same name so that I will not overwrite my original image in the original folder.
image = imread('15.tif'); %read image
%%CODE FOR imageprocess
imwrite(15,'C:\Users\user\Desktop\experiment\edited','tif'); %save image
However, when I do so, I got this error instead.
Can't open file "C:\Users\user\Desktop\experiment\edited" for writing. You may not have write permission.
How can I overcome this problem? Thank you ! :)
Accepted Answer
More Answers (1)
Image Analyst
on 9 Jan 2013
0 votes
Are you sure you don't already have the file open for some reason, like you popped it open in the Windows Image and Fax Viewer which may have put a lock on it?
Categories
Find more on Environment and Settings 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!