<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Javascript decodes inline images</title>
	<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/</link>
	<description>如 影 随 行</description>
	<pubDate>Sat, 22 Nov 2008 04:47:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1.2</generator>

	<item>
		<title>by: gary</title>
		<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-86777</link>
		<pubDate>Mon, 13 Aug 2007 14:26:29 +0000</pubDate>
		<guid>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-86777</guid>
					<description>Jacquie,

the colorcube example below work for my Firefox 2.x. I have not tried extracting image from Java applets, though.

test: http://www.elf.org/colorcube/index.html?true</description>
		<content:encoded><![CDATA[	<p>Jacquie,</p>
	<p>the colorcube example below work for my Firefox 2.x. I have not tried extracting image from Java applets, though.</p>
	<p>test: <a href='http://www.elf.org/colorcube/index.html?true' rel='nofollow'>http://www.elf.org/colorcube/index.html?true</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jacquie</title>
		<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-86393</link>
		<pubDate>Thu, 09 Aug 2007 20:34:04 +0000</pubDate>
		<guid>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-86393</guid>
					<description>Hi,

I have been trying to find a way to extract a .gif image from an applet with JavaScript so it could be saved using the browser's Save Image option from the pop-up menu.  And I was hoping this might be the way.  However the example you have given doesn't work on the latest FireFox - unless I am doing something wrong which is quite likely - or IE.

I was hoping you might have worked on this some more since you wrote this or if you could at least point me in the right direction.

Thanks!</description>
		<content:encoded><![CDATA[	<p>Hi,</p>
	<p>I have been trying to find a way to extract a .gif image from an applet with JavaScript so it could be saved using the browser&#8217;s Save Image option from the pop-up menu.  And I was hoping this might be the way.  However the example you have given doesn&#8217;t work on the latest FireFox - unless I am doing something wrong which is quite likely - or IE.</p>
	<p>I was hoping you might have worked on this some more since you wrote this or if you could at least point me in the right direction.</p>
	<p>Thanks!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: gary</title>
		<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-909</link>
		<pubDate>Sun, 12 Jun 2005 03:51:39 +0000</pubDate>
		<guid>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-909</guid>
					<description>ok, now I remember what I was trying to do -- to solve an archiving problem in blogging.

I had been blogging for a few years by then, and some external pictures had gone off line, leaving urgly broken images on my blog archive pages. But what's more important was that some of the images had historical significance and it would be a loss if they are gone forever without a trace.

What I thought would be great for blog archiving was to not only save all the HTML code but also embed the images into the same archival page. Simply downloading images to the local server is not practical (tried wget for several months; if you choose the keep the server paths, you end up with a deep an confusing directory tree; if you use flat path, files with same names will overwrite each other; it's bad either ways). 

It seemed to me the best way was to somehow encode the images and store the info in HTML/javascript. That's why I wanted to read an image from the DOM, get the BASE64 encoding, and embed the string into the page. It's basically the same idea as MIME/HTML, but uisng Javascript rather than relying on the support of browsers. 

Like many other projects, I simply didn't have time to pursue. So it's still a unsolved problem. 

Copyright might be a problem. However, one could always check to see if the original is gone, ask the user before displaying the &quot;cached&quot; images -- if Google can do it, why not us? 

Well, technically, it's not worked out yet. That's why.</description>
		<content:encoded><![CDATA[	<p>ok, now I remember what I was trying to do &#8212; to solve an archiving problem in blogging.</p>
	<p>I had been blogging for a few years by then, and some external pictures had gone off line, leaving urgly broken images on my blog archive pages. But what&#8217;s more important was that some of the images had historical significance and it would be a loss if they are gone forever without a trace.</p>
	<p>What I thought would be great for blog archiving was to not only save all the HTML code but also embed the images into the same archival page. Simply downloading images to the local server is not practical (tried wget for several months; if you choose the keep the server paths, you end up with a deep an confusing directory tree; if you use flat path, files with same names will overwrite each other; it&#8217;s bad either ways). </p>
	<p>It seemed to me the best way was to somehow encode the images and store the info in HTML/javascript. That&#8217;s why I wanted to read an image from the DOM, get the BASE64 encoding, and embed the string into the page. It&#8217;s basically the same idea as MIME/HTML, but uisng Javascript rather than relying on the support of browsers. </p>
	<p>Like many other projects, I simply didn&#8217;t have time to pursue. So it&#8217;s still a unsolved problem. </p>
	<p>Copyright might be a problem. However, one could always check to see if the original is gone, ask the user before displaying the &#8220;cached&#8221; images &#8212; if Google can do it, why not us? </p>
	<p>Well, technically, it&#8217;s not worked out yet. That&#8217;s why.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: gary</title>
		<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-908</link>
		<pubDate>Sun, 12 Jun 2005 03:35:56 +0000</pubDate>
		<guid>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-908</guid>
					<description>David,

You are right if this were for production. I was experimenting with several options then. I forgot what project I was working on and why, but with regard to the comment I think I was trying to see how a real  image object can be Bast64-encoded, so that I could come up with a sample for testing. 

-- gary</description>
		<content:encoded><![CDATA[	<p>David,</p>
	<p>You are right if this were for production. I was experimenting with several options then. I forgot what project I was working on and why, but with regard to the comment I think I was trying to see how a real  image object can be Bast64-encoded, so that I could come up with a sample for testing. </p>
	<p>&#8211; gary
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Weingart</title>
		<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-906</link>
		<pubDate>Sat, 11 Jun 2005 22:55:43 +0000</pubDate>
		<guid>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-906</guid>
					<description>&lt;blockquote&gt;The alternative is to read an image from the DOM and pass the binary string to a javascript variable.&lt;/blockquote&gt;

Do you have sample code for that? I'm a bit confused...if you're reading an image from the DOM, how did that image get into the DOM? If it's an external image, wouldn't that defeat the purpose of decoding inline images?</description>
		<content:encoded><![CDATA[	<blockquote><p>The alternative is to read an image from the DOM and pass the binary string to a javascript variable.</p></blockquote>
	<p>Do you have sample code for that? I&#8217;m a bit confused&#8230;if you&#8217;re reading an image from the DOM, how did that image get into the DOM? If it&#8217;s an external image, wouldn&#8217;t that defeat the purpose of decoding inline images?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Gary Feng</title>
		<link>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-170</link>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid>http://www.garyfeng.com/wordpress/2003/10/28/javascript-decodes-inline-images/#comment-170</guid>
					<description>after spending a lot of time to no veil did I find that IE does not support &quot;atob() or btoa()&quot; equivilants. 

The alternative is to read an image from the DOM and pass the binary string to a javascript variable.


</description>
		<content:encoded><![CDATA[	<p>after spending a lot of time to no veil did I find that IE does not support &#8220;atob() or btoa()&#8221; equivilants. </p>
	<p>The alternative is to read an image from the DOM and pass the binary string to a javascript variable.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
