0
我想用原始文件以相同的延遲時間重新寫入GIF文件。這是示例圖像:在matlab中寫入GIF文件的延遲時間
這是我的代碼,但輸出具有比原來延遲慢。有沒有辦法讓它平等?
[I map]=imread('a.gif');
delay=0.1;
frame=size(I,4);
loops=65535;
for i = 1:frame
if i==1
imwrite(I(:,:,:,i),map,'b.gif','gif','LoopCount',loops, 'DelayTime', delay); %save file output
else
imwrite(I(:,:,:,i),'b.gif','gif','WriteMode', 'append'); %save file output
end
end