How put a gif on GUIDE
4 ビュー (過去 30 日間)
古いコメントを表示
Hi guys, can someone expain me how to put a gif please?
I need put this gif:
![gifmathlab.gif](https://www.mathworks.com/matlabcentral/answers/uploaded_files/238459/gifmathlab.gif)
![here.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/238460/here.png)
0 件のコメント
採用された回答
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
2019 年 9 月 16 日
img = imread('PathToBackground');
ax = handles.TagOfTheBackgroundAxesYouAlreadyCreated;
image(ax, img);
img = imread('PathToLogoImage');
ax = handles.TagOfTheLogoAxesYouAlreadyCreated;
image(ax, img);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!