[转载]利用Matlab读取gif文件并且保存图像

标签:
转载 |
分类: matlab相关 |
有些gif图像很好,想得到其中的图像可以这样干:
下边的代码本人亲自试验过……
clc;close all;clear all
info = imfinfo('3.gif');%第一次读取,用于获取属性值
W = info.Width;
H = info.Height;
W = W(1);
H = H(1);
len = length(info);
figure('NumberTitle', 'off', 'ToolBar', 'none', 'Menu',
'none');
pos = get(gcf, 'position');
set(gcf, 'position', [pos(1) pos(2) W H]);
set(gca, 'position', [0 0 1 1]);
hold on;
for i = 1 : len
end
movie(F, 20);
close;
原始的gif文件: