Save the GIF file. m

Source: Internet
Author: User

Filename=strcat (' C:\Users\Public\Videos\Sample videos\imw\imwrite\ ', int2str (i), '. ', ' jpg '); Clc;figure% New chart axis ([0 5 0 2])% defines the x-axis (from 0 to 5) and the y-axis range (from 0 to 2) for I=1:4 if i==1 text (i,1, ' hundred ', ' fontsize ', +, ' color ', ' red        %i=1, write a ' hundred ' word End If i==2 text (i,1, ' degrees ', ' fontsize ', ' + ', ' color ', ' red ');%i=2, write a ' degree ' word End if i==3 Text (i,1, ' Sutra ', ' fontsize ', ' max ', ' Color ', ' red '); %i=3, write a ' by ' word End If i==4 text (i,1, ' Test ', ' fontsize ', ' + ', ' color ', ' red ');%i=4, write a ' test ' word end picname=[num2     STR (i) '. Fig '];% saved file name: When I=1, Picname=1.fig hold on% write the following words, do not flush the preceding words out of the SaveAs (Gcf,picname) endstepall=4;for I=1:stepall    PICNAME=[NUM2STR (i) '. Fig ';      Open (Picname)% set (GCF, ' outerposition ', get (0, ' screensize ')),% matlab window maximizes frame=getframe (GCF);              Im=frame2im (frame);% make GIF file, image must be index indexed image [I,map]=rgb2ind (im,20);    If I==1 imwrite (i,map, ' baidujingyan.gif ', ' gif ', ' Loopcount ', INF, ' Delaytime ', 0.5);% must be created for the first time! ElseIf I==stepall IMWRITE (I,map, ' baidujingyan.gif ', ' gif ', ' writemode ', ' append ', ' delaytime ', 0.5);    else Imwrite (i,map, ' baidujingyan.gif ', ' gif ', ' writemode ', ' append ', ' delaytime ', 0.5);      End Close Allend

Save the GIF file. m

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.