<?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: Get DPI value of an image using PHP</title>
	<atom:link href="http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/feed" rel="self" type="application/rss+xml" />
	<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-dpi-value-of-an-image-using-php</link>
	<description>Blog of Yeni Setiawan: Indonesian blogger, web developer and Opera browser user.</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:41:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Damy</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-46105</link>
		<dc:creator>Damy</dc:creator>
		<pubDate>Tue, 18 Oct 2011 10:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-46105</guid>
		<description>I was strugeling with this, and since I found it, her you go. 

function get_dpi($filename){  
    $a = fopen($filename,&#039;r&#039;);  
    $string = fread($a,20);  
    fclose($a);  
    
    $data = bin2hex(substr($string,14,4));  
    $x = substr($data,0,4);  
    $y = substr($data,0,4);  
    return array(hexdec($x),hexdec($y));  
}

and then print the array or do with it what you want.

Cheers</description>
		<content:encoded><![CDATA[<p>I was strugeling with this, and since I found it, her you go. </p>
<p>function get_dpi($filename){<br />
    $a = fopen($filename,&#8217;r');<br />
    $string = fread($a,20);<br />
    fclose($a);  </p>
<p>    $data = bin2hex(substr($string,14,4));<br />
    $x = substr($data,0,4);<br />
    $y = substr($data,0,4);<br />
    return array(hexdec($x),hexdec($y));<br />
}</p>
<p>and then print the array or do with it what you want.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sartaj</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-41794</link>
		<dc:creator>Sartaj</dc:creator>
		<pubDate>Tue, 19 Jul 2011 06:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-41794</guid>
		<description>The above code is not working for uploaded image please tell me how to get DPI of uploaded image using php.</description>
		<content:encoded><![CDATA[<p>The above code is not working for uploaded image please tell me how to get DPI of uploaded image using php.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-40438</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Wed, 01 Jun 2011 15:43:55 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-40438</guid>
		<description>Sure this would be much easier to do using the imageMagick library. &lt;a href=&quot;http://uk.php.net/manual/en/function.imagick-getimageresolution.php&quot; rel=&quot;nofollow&quot;&gt;Imagemagick::getImageResolution&lt;/a&gt;

That should save a lot of hacking.</description>
		<content:encoded><![CDATA[<p>Sure this would be much easier to do using the imageMagick library. <a href="http://uk.php.net/manual/en/function.imagick-getimageresolution.php" rel="nofollow">Imagemagick::getImageResolution</a></p>
<p>That should save a lot of hacking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohammad</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-26056</link>
		<dc:creator>Mohammad</dc:creator>
		<pubDate>Thu, 04 Mar 2010 16:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-26056</guid>
		<description>Nice work!
This works well with JPEG images but not for PNG images.</description>
		<content:encoded><![CDATA[<p>Nice work!<br />
This works well with JPEG images but not for PNG images.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rosario Rojas</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-23356</link>
		<dc:creator>Rosario Rojas</dc:creator>
		<pubDate>Fri, 27 Nov 2009 08:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-23356</guid>
		<description>This is a very good code. Saved me a lot of work to modify more than 1,000 JPG images.

Thank you very much!!!.</description>
		<content:encoded><![CDATA[<p>This is a very good code. Saved me a lot of work to modify more than 1,000 JPG images.</p>
<p>Thank you very much!!!.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sindre</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-22558</link>
		<dc:creator>Sindre</dc:creator>
		<pubDate>Thu, 29 Oct 2009 22:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-22558</guid>
		<description>For some reason i get a DPI value: 17490
Isnt this to high? Its just a png-logo..</description>
		<content:encoded><![CDATA[<p>For some reason i get a DPI value: 17490<br />
Isnt this to high? Its just a png-logo..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MS</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-22237</link>
		<dc:creator>MS</dc:creator>
		<pubDate>Mon, 19 Oct 2009 14:21:50 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-22237</guid>
		<description>This doesn&#039;t work at all, and I like the author writing:
print_r(get_dpi2(&#039;filename.jpg&#039;));

when he calls the function &quot;get_dpi&quot; and then call &quot;get_dpi2&quot; for some reason that I can&#039;t seem to understand.

Lovely function, beside the non-working part.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t work at all, and I like the author writing:<br />
print_r(get_dpi2(&#8216;filename.jpg&#8217;));</p>
<p>when he calls the function &#8220;get_dpi&#8221; and then call &#8220;get_dpi2&#8243; for some reason that I can&#8217;t seem to understand.</p>
<p>Lovely function, beside the non-working part.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-2163</link>
		<dc:creator>john</dc:creator>
		<pubDate>Wed, 23 Jul 2008 08:40:59 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-2163</guid>
		<description>Man, this is a great function that works really well. However, it seems it can&#039;t read DPI information of a JPEG created on a MAC. I guess encoding methods differ. Do you know where the DPI information is located on a MAC-created JPEG?</description>
		<content:encoded><![CDATA[<p>Man, this is a great function that works really well. However, it seems it can&#8217;t read DPI information of a JPEG created on a MAC. I guess encoding methods differ. Do you know where the DPI information is located on a MAC-created JPEG?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP ile resim dosyas?n?n DPI bilgisini alal?m - Günlük Haftal?k Ayl?k</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-1471</link>
		<dc:creator>PHP ile resim dosyas?n?n DPI bilgisini alal?m - Günlük Haftal?k Ayl?k</dc:creator>
		<pubDate>Thu, 15 May 2008 20:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-1471</guid>
		<description>[...] Kaynak: Get DPI value of an image using PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] Kaynak: Get DPI value of an image using PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moe</title>
		<link>http://sandalian.com/php/get-dpi-value-of-an-image-using-php.html/comment-page-1#comment-304</link>
		<dc:creator>moe</dc:creator>
		<pubDate>Thu, 10 Apr 2008 09:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=76#comment-304</guid>
		<description>hi, 
i know this is way offfff topic, but you think you know how to get a Snap shot of a website in different sizes? if so, could you post it on as a blog or maybe give some ideas and point us to few tutorials that maybe helpful?

thanks a bunch!</description>
		<content:encoded><![CDATA[<p>hi,<br />
i know this is way offfff topic, but you think you know how to get a Snap shot of a website in different sizes? if so, could you post it on as a blog or maybe give some ideas and point us to few tutorials that maybe helpful?</p>
<p>thanks a bunch!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

