High Resolution / Quality .gif
Afficher commentaires plus anciens
Dear all,
I want to change the resolution of my .gif. Creating the .gif is no problem, here is an code example (source: http://stackoverflow.com/questions/11051307/approaches-to-create-a-video-in-matlab):
%# figure
figure, set(gcf, 'Color','white')
Z = peaks; surf(Z); axis tight
set(gca, 'nextplot','replacechildren', 'Visible','off');
%# preallocate
nFrames = 20;
f = getframe(gca);
[f,map] = rgb2ind(f.cdata, 256, 'nodither');
mov = repmat(f, [1 1 1 nFrames]);
%# create movie
for k=1:nFrames
surf(sin(2*pi*k/20)*Z, Z)
f = getframe(gca);
mov(:,:,1,k) = rgb2ind(f.cdata, map, 'nodither');
end
close(gcf)
%# create GIF and open
imwrite(mov, map, 'myPeaks4.gif', 'DelayTime',0, 'LoopCount',inf)
winopen('myPeaks4.gif')
But how to change the quality of the .gif? Thanks a lot!
Réponses (1)
Jan
le 17 Fév 2015
0 votes
GIF use a lossless compression. Therefore you cannot change the "quality".
Catégories
En savoir plus sur Image Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!