필터 지우기
필터 지우기

How put a gif on GUIDE

조회 수: 5 (최근 30일)
Jhon Rackham
Jhon Rackham 2019년 9월 16일
댓글: Jhon Rackham 2019년 9월 16일
Hi guys, can someone expain me how to put a gif please?
I need put this gif:
gifmathlab.gif here.png

채택된 답변

Walter Roberson
Walter Roberson 2019년 9월 16일
GUIDE does not directly support playing GIFs.
What you can do is read the frames of the GIF and store them in an accessible place. Create an image() object in the appropriate axes with data initialized to all 0 and store the handle in an accessible place. Initialize an index to 1 in an accessible place. Then start a timer with a time interval equal to 1 divided by the desired frame rate.
The timer callback should retrieve the index, and retrieve the saved images, and retrieve the handle of the image object. It should set the CData property of the image object to the frames indexed at the current index. It should then increment the index by one, and if the result is greater than the number of frames, set it to 1, and it should save the updated frame index.
  댓글 수: 8
Walter Roberson
Walter Roberson 2019년 9월 16일
img = imread('PathToBackground');
ax = handles.TagOfTheBackgroundAxesYouAlreadyCreated;
image(ax, img);
img = imread('PathToLogoImage');
ax = handles.TagOfTheLogoAxesYouAlreadyCreated;
image(ax, img);
Jhon Rackham
Jhon Rackham 2019년 9월 16일
Thanks a lot Mr Roberson.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by