<?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: Getting JPG dimensions with AS3 without loading the entire file</title>
	<atom:link href="http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/</link>
	<description>Personal blog, portfolio &#38; online playground</description>
	<lastBuildDate>Tue, 09 Mar 2010 12:08:53 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Antti</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-118627</link>
		<dc:creator>Antti</dc:creator>
		<pubDate>Sat, 13 Feb 2010 16:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-118627</guid>
		<description>Excellent, thanks for sharing Christophe!</description>
		<content:encoded><![CDATA[<p>Excellent, thanks for sharing Christophe!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christophe Herreman</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-118613</link>
		<dc:creator>Christophe Herreman</dc:creator>
		<pubDate>Fri, 12 Feb 2010 21:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-118613</guid>
		<description>Hi, thanks for this class. I created a simple size extractor for PNG files and thought you might be interested. More info: http://www.herrodius.com/blog/265</description>
		<content:encoded><![CDATA[<p>Hi, thanks for this class. I created a simple size extractor for PNG files and thought you might be interested. More info: <a href="http://www.herrodius.com/blog/265" rel="nofollow" onclick="javascript:urchinTracker ('/outbound/comment/www.herrodius.com');">http://www.herrodius.com/blog/265</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antti</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-117940</link>
		<dc:creator>Antti</dc:creator>
		<pubDate>Tue, 26 Jan 2010 00:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-117940</guid>
		<description>MEM: Sure, go ahead!

Ali: It&#039;s 8 + number of components * 3, see the numbered list in the post. Count the bytes in the image with the hex and i think you&#039;ll see how it&#039;s built up :)

Zari: Unfortunately this only supports reading the meta data of a jpg, not the actual pixel data A similar approach could probably be applied to achieve what you want though, but it would get more complicated</description>
		<content:encoded><![CDATA[<p>MEM: Sure, go ahead!</p>
<p>Ali: It&#8217;s 8 + number of components * 3, see the numbered list in the post. Count the bytes in the image with the hex and i think you&#8217;ll see how it&#8217;s built up <img src='http://www.anttikupila.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Zari: Unfortunately this only supports reading the meta data of a jpg, not the actual pixel data A similar approach could probably be applied to achieve what you want though, but it would get more complicated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ‌Zari</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-117880</link>
		<dc:creator>‌Zari</dc:creator>
		<pubDate>Sat, 23 Jan 2010 07:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-117880</guid>
		<description>Hi Antti,
Thanks for great information. I want to extract RGB data for one pixel from one image.
for example I have a 1000X1000 pixel image, and I want value of a pixel that is in (100,100). It is (255,0,125). [It is a value that returned by Getpixel() method in Bitmap class.]
How can I do that?
Thanks a lot</description>
		<content:encoded><![CDATA[<p>Hi Antti,<br />
Thanks for great information. I want to extract RGB data for one pixel from one image.<br />
for example I have a 1000X1000 pixel image, and I want value of a pixel that is in (100,100). It is (255,0,125). [It is a value that returned by Getpixel() method in Bitmap class.]<br />
How can I do that?<br />
Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-117454</link>
		<dc:creator>Ali</dc:creator>
		<pubDate>Mon, 11 Jan 2010 11:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-117454</guid>
		<description>Hi Antti,

Thanks for the really great information pal, but how did you get that the length(0x11) is 17 bytes!? on what base did you calculated the bytes (8 + 3x3 as we&#039;re assuming it&#039;s an RGB image)

Is there a way to get more info about the photos and files binary data and in what base identifiers get together or something like that?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Antti,</p>
<p>Thanks for the really great information pal, but how did you get that the length(0&#215;11) is 17 bytes!? on what base did you calculated the bytes (8 + 3&#215;3 as we&#8217;re assuming it&#8217;s an RGB image)</p>
<p>Is there a way to get more info about the photos and files binary data and in what base identifiers get together or something like that?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MEM</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-116039</link>
		<dc:creator>MEM</dc:creator>
		<pubDate>Wed, 02 Dec 2009 14:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-116039</guid>
		<description>hello, and sorry for my english

I want to ask you, can I use this library for not commercial project.
I create data dispetcher, when I load JPG and another files like tasks, and I wont get JPG size before loading

Now, this is project is used by only me, but I&#039;m thinking about sharing</description>
		<content:encoded><![CDATA[<p>hello, and sorry for my english</p>
<p>I want to ask you, can I use this library for not commercial project.<br />
I create data dispetcher, when I load JPG and another files like tasks, and I wont get JPG size before loading</p>
<p>Now, this is project is used by only me, but I&#8217;m thinking about sharing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoffrey McRae</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-115863</link>
		<dc:creator>Geoffrey McRae</dc:creator>
		<pubDate>Tue, 24 Nov 2009 05:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-115863</guid>
		<description>Or, if you want to do it in a simple nice self-contained static function without all this extra overhead...

		private static function getImageSize_JPEG(data: ByteArray): Point {
			if (data.length &lt; 4) return null;
			data.endian		= Endian.BIG_ENDIAN;	
			data.position	= 0;
			
			var magic	: uint;
			var marker	: uint;
			var length	: uint;
			var x		: uint;
			var y		: uint;
			
			magic	= data.readUnsignedShort();
			marker	= data.readUnsignedShort();
			if (magic != 0xFFD8) return null;
			
			while(data.position &lt; data.length - 1) {
				switch(marker) {
					case 0xFFC0:
						data.position += 3;
						y = data.readUnsignedShort();
						x = data.readUnsignedShort();
						return new Point(x, y);
						
					default:
						length			= data.readUnsignedShort() - 2;
						data.position	+= length;
						marker			= data.readUnsignedShort();
						break;
				}
			}
			
			return null;
		}</description>
		<content:encoded><![CDATA[<p>Or, if you want to do it in a simple nice self-contained static function without all this extra overhead&#8230;</p>
<p>		private static function getImageSize_JPEG(data: ByteArray): Point {<br />
			if (data.length &lt; 4) return null;<br />
			data.endian		= Endian.BIG_ENDIAN;<br />
			data.position	= 0;</p>
<p>			var magic	: uint;<br />
			var marker	: uint;<br />
			var length	: uint;<br />
			var x		: uint;<br />
			var y		: uint;</p>
<p>			magic	= data.readUnsignedShort();<br />
			marker	= data.readUnsignedShort();<br />
			if (magic != 0xFFD8) return null;</p>
<p>			while(data.position &lt; data.length &#8211; 1) {<br />
				switch(marker) {<br />
					case 0xFFC0:<br />
						data.position += 3;<br />
						y = data.readUnsignedShort();<br />
						x = data.readUnsignedShort();<br />
						return new Point(x, y);</p>
<p>					default:<br />
						length			= data.readUnsignedShort() &#8211; 2;<br />
						data.position	+= length;<br />
						marker			= data.readUnsignedShort();<br />
						break;<br />
				}<br />
			}</p>
<p>			return null;<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Как получить данные о ширине и высоте JPG-изображения не загружая само изображение?</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-115520</link>
		<dc:creator>Как получить данные о ширине и высоте JPG-изображения не загружая само изображение?</dc:creator>
		<pubDate>Thu, 05 Nov 2009 19:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-115520</guid>
		<description>[...] же и нашел решение, которым со мной любезно поделился.  Ответ оказался достаточно прост, но к сожалению не [...]</description>
		<content:encoded><![CDATA[<p>[...] же и нашел решение, которым со мной любезно поделился.  Ответ оказался достаточно прост, но к сожалению не [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hussein</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-115418</link>
		<dc:creator>Hussein</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-115418</guid>
		<description>Brilliant work  mate! is their a way to do the same for png ?</description>
		<content:encoded><![CDATA[<p>Brilliant work  mate! is their a way to do the same for png ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wrapping text around an image or movieclip in Flash</title>
		<link>http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/comment-page-2/#comment-115383</link>
		<dc:creator>Wrapping text around an image or movieclip in Flash</dc:creator>
		<pubDate>Thu, 29 Oct 2009 17:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/#comment-115383</guid>
		<description>[...] There are many situations where getting an image&#8217;s dimensions before loading it is desireable, and Flash doesn&#8217;t ship with any built-in methods for this. Thankfully, Antti Kupila has written an excellent class for exactly this purpose, called JPGSizeExtractor. [...]</description>
		<content:encoded><![CDATA[<p>[...] There are many situations where getting an image&#8217;s dimensions before loading it is desireable, and Flash doesn&#8217;t ship with any built-in methods for this. Thankfully, Antti Kupila has written an excellent class for exactly this purpose, called JPGSizeExtractor. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
