Why do I receive a 'Couldn't open file for writing' error when using IMWRITE on MATLAB 7.8 (R2009a)?
Show older comments
I have a section of code that uses IMWRITE to append to a TIFF file while inside of a loop:
I = rand([400 400 61],'double')*1500;
tname = 'file.tif';
for j = 1:52
for i=1:size(I,3)
imwrite(uint16(I(:,:,i)),tname,'WriteMode','append','Compression','none');
end
end
It will sporatically produce the following error:
??? Error using ==> writetif at 100
Couldn't open 'file.tif' for writing.
Accepted Answer
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!