why append does not working
31 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to save multiple images in file
but it save one image

img1 = imread("try1.pgm");
img2 = imread( "try2.pgm");
folder = "/Users/roaaalnader/Documents/MATLAB/TryImg.tif" % file.tif path
folder=fullfile(folder,'img.tif') % to solve you don't have permission error
imwrite(img1,folder);
imwrite(img2,folder,'WriteMode','append' ); % here append doesn't work
%% see the attached picture the file has just the frist image
9 件のコメント
dpb
2022 年 9 月 3 日
@Walter Roberson may be on to something with the file naming -- I didn't test that although I did notice it.
...
folder = "/Users/roaaalnader/Documents/MATLAB/TryImg"; % file .tif path
folder=fullfile(folder,'img.tif');
imwrite(img1,folder);
imwrite(img2,folder,'WriteMode','append' ); % here append doesn't work
Then your final file will be in file
/Users/roaaalnader/Documents/MATLAB/TryImg/img.tif
removing the extra .tif on the folder name.
Again, you didn't actually show us the results -- just telling us something isn't enough to be able to prove what did/did not happen.
Show the results between the imwrite calls asked for before so we can see actual results obtained -- we can't see your terminal from here, sorry.
回答 (2 件)
参考
カテゴリ
Help Center および File Exchange で Large Files and Big Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!