<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Displaying animated GIFs	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/displaying-animated-gifs/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=displaying-animated-gifs</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Mon, 30 Mar 2015 17:06:50 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: ME		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-347313</link>

		<dc:creator><![CDATA[ME]]></dc:creator>
		<pubDate>Mon, 30 Mar 2015 17:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-347313</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-347310&quot;&gt;ME&lt;/a&gt;.

... using a pushbutton]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-347310">ME</a>.</p>
<p>&#8230; using a pushbutton</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ME		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-347310</link>

		<dc:creator><![CDATA[ME]]></dc:creator>
		<pubDate>Mon, 30 Mar 2015 16:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-347310</guid>

					<description><![CDATA[thank you very much !!
What if I want to hide a GIF that was already displayed ?]]></description>
			<content:encoded><![CDATA[<p>thank you very much !!<br />
What if I want to hide a GIF that was already displayed ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346859</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 18 Mar 2015 21:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-346859</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346809&quot;&gt;Greg Mason&lt;/a&gt;.

@Greg - I assume that you are aware of the fact that the compiled binary is simply a self-extracting exe that anyone can open using winzip and see the internal image resources (although not the code - those files are encrypted).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346809">Greg Mason</a>.</p>
<p>@Greg &#8211; I assume that you are aware of the fact that the compiled binary is simply a self-extracting exe that anyone can open using winzip and see the internal image resources (although not the code &#8211; those files are encrypted).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg Mason		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346809</link>

		<dc:creator><![CDATA[Greg Mason]]></dc:creator>
		<pubDate>Tue, 17 Mar 2015 18:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-346809</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796&quot;&gt;Greg Mason&lt;/a&gt;.

Sorry - maybe my vernacular was not correct. What I did not want was for the GIF file to be seen by the end user. They would only see the .exe, that way the GIF will always work whether or not they move the .exe between folders and they wouldn&#039;t be able to change the location/delete the GIF either.

When I use the deploytool as described with the code above, the end result is a just a single .exe file that can be moved and distributed yet still has a functioning GIF. The end user will only see the .exe which was my goal.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796">Greg Mason</a>.</p>
<p>Sorry &#8211; maybe my vernacular was not correct. What I did not want was for the GIF file to be seen by the end user. They would only see the .exe, that way the GIF will always work whether or not they move the .exe between folders and they wouldn&#8217;t be able to change the location/delete the GIF either.</p>
<p>When I use the deploytool as described with the code above, the end result is a just a single .exe file that can be moved and distributed yet still has a functioning GIF. The end user will only see the .exe which was my goal.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346803</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 17 Mar 2015 17:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-346803</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346801&quot;&gt;Greg Mason&lt;/a&gt;.

@Greg - you said you didn&#039;t want the image to appear in the deployment folder, but that&#039;s exactly what you did above...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346801">Greg Mason</a>.</p>
<p>@Greg &#8211; you said you didn&#8217;t want the image to appear in the deployment folder, but that&#8217;s exactly what you did above&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg Mason		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346801</link>

		<dc:creator><![CDATA[Greg Mason]]></dc:creator>
		<pubDate>Tue, 17 Mar 2015 17:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-346801</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796&quot;&gt;Greg Mason&lt;/a&gt;.

Unfortunately one of the reasons for distributing is when people are not connected to the inter/intranet they can still run the programs without needing a matlab license. 

However, I appear to have found a workaround. The below code is in my .m file and the file &quot;Pic_For_Error.gif&quot; is included in the Shared Resources and Helper Files section of deploytool (the same section that the .fig file is included). Hope this helps anyone that may want to distribute their GUIs with GIFs!

&lt;pre lang=&#039;matlab&#039;&gt;
fname = &#039;Pic_For_Error.gif&#039;;
hFig = figure(&#039;Color&#039;,&#039;w&#039;);
jLabel = javaObjectEDT(&#039;javax.swing.JLabel&#039;,javaObjectEDT(&#039;javax.swing.ImageIcon&#039;,which(fname)));
[hJ,hC] = javacomponent(jLabel,getpixelposition(hFig).*[0 0 1 1],hFig);
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796">Greg Mason</a>.</p>
<p>Unfortunately one of the reasons for distributing is when people are not connected to the inter/intranet they can still run the programs without needing a matlab license. </p>
<p>However, I appear to have found a workaround. The below code is in my .m file and the file &#8220;Pic_For_Error.gif&#8221; is included in the Shared Resources and Helper Files section of deploytool (the same section that the .fig file is included). Hope this helps anyone that may want to distribute their GUIs with GIFs!</p>
<pre lang='matlab'>
fname = 'Pic_For_Error.gif';
hFig = figure('Color','w');
jLabel = javaObjectEDT('javax.swing.JLabel',javaObjectEDT('javax.swing.ImageIcon',which(fname)));
[hJ,hC] = javacomponent(jLabel,getpixelposition(hFig).*[0 0 1 1],hFig);
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346799</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 17 Mar 2015 15:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-346799</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796&quot;&gt;Greg Mason&lt;/a&gt;.

@Grep - you could place the GIF on some website (either your own or some public image-sharing site) and let the HTML img src point to the relevant URL rather than to local disk file. Of course, the user would need to have internet connection to that URL in order to see the GIF.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796">Greg Mason</a>.</p>
<p>@Grep &#8211; you could place the GIF on some website (either your own or some public image-sharing site) and let the HTML img src point to the relevant URL rather than to local disk file. Of course, the user would need to have internet connection to that URL in order to see the GIF.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg Mason		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-346796</link>

		<dc:creator><![CDATA[Greg Mason]]></dc:creator>
		<pubDate>Tue, 17 Mar 2015 14:45:59 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-346796</guid>

					<description><![CDATA[This post has been very helpful, but now I&#039;m trying to use the deploytool to package my GUI for distribution. Unfortunately when it&#039;s packaged the address still maps back to my local drive and the GIF doesn&#039;t work - is there a way to hide / embed the GIF in the package so the end user won&#039;t see the picture file in their directory but still have it show up in the GUI?

Thanks again.]]></description>
			<content:encoded><![CDATA[<p>This post has been very helpful, but now I&#8217;m trying to use the deploytool to package my GUI for distribution. Unfortunately when it&#8217;s packaged the address still maps back to my local drive and the GIF doesn&#8217;t work &#8211; is there a way to hide / embed the GIF in the package so the end user won&#8217;t see the picture file in their directory but still have it show up in the GUI?</p>
<p>Thanks again.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-345633</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 15 Feb 2015 13:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-345633</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-345632&quot;&gt;lalitkumar annaldas&lt;/a&gt;.

@Lalitkumar - if you insist on using an axes (why???), then you could use a timer to refresh the displayed image frame at a certain frequency.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-345632">lalitkumar annaldas</a>.</p>
<p>@Lalitkumar &#8211; if you insist on using an axes (why???), then you could use a timer to refresh the displayed image frame at a certain frequency.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: lalitkumar annaldas		</title>
		<link>https://undocumentedmatlab.com/articles/displaying-animated-gifs#comment-345632</link>

		<dc:creator><![CDATA[lalitkumar annaldas]]></dc:creator>
		<pubDate>Sun, 15 Feb 2015 13:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3772#comment-345632</guid>

					<description><![CDATA[hey,
but what if i wanted to display the animated gif file on one of the axes present in the GUI of MATLAB instead of displaying it on external figure window.
If you can help me please forward the code to my mail ID:-
heavensfallhere2010@gmail.com]]></description>
			<content:encoded><![CDATA[<p>hey,<br />
but what if i wanted to display the animated gif file on one of the axes present in the GUI of MATLAB instead of displaying it on external figure window.<br />
If you can help me please forward the code to my mail ID:-<br />
<a href="mailto:heavensfallhere2010@gmail.com">heavensfallhere2010@gmail.com</a></p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
