<?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: PHP Imagecreate &amp; Different File Types</title>
	<atom:link href="http://cowburn.info/2008/01/22/imagecreatefrom-string-remote/feed/" rel="self" type="application/rss+xml" />
	<link>http://cowburn.info/2008/01/22/imagecreatefrom-string-remote/</link>
	<description>Online storage depot for Peter Cowburn</description>
	<lastBuildDate>Sat, 04 Feb 2012 12:58:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Peter</title>
		<link>http://cowburn.info/2008/01/22/imagecreatefrom-string-remote/#comment-44344</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 04 Mar 2009 01:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://cowburn.info/php/imagecreatefrom-string-remote/#comment-44344</guid>
		<description>Once the image has been loaded through any of the imagecreatefrom* functions, it is (to the best of my knowledge) actually of a type internal to GD. This means that it can be saved out as any type of image without needing to know the MIME of the original file in the blob.  There are ways of determining the MIME type from the binary data but it&#039;s not worth delving into unless it is necessary.  Another thought, if it&#039;s simpler or possible for you, would be to store the image type at the same time you write the blob to the database (usually just after uploading), for that &lt;a href=&quot;http://php.net/getimagesize&quot; rel=&quot;nofollow&quot;&gt;getimagesize&lt;/a&gt; or the &lt;a href=&quot;http://php.net/fileinfo&quot; rel=&quot;nofollow&quot;&gt;Fileinfo&lt;/a&gt; extension would be useful..</description>
		<content:encoded><![CDATA[<p>Once the image has been loaded through any of the imagecreatefrom* functions, it is (to the best of my knowledge) actually of a type internal to GD. This means that it can be saved out as any type of image without needing to know the MIME of the original file in the blob.  There are ways of determining the MIME type from the binary data but it&#8217;s not worth delving into unless it is necessary.  Another thought, if it&#8217;s simpler or possible for you, would be to store the image type at the same time you write the blob to the database (usually just after uploading), for that <a href="http://php.net/getimagesize" rel="nofollow">getimagesize</a> or the <a href="http://php.net/fileinfo" rel="nofollow">Fileinfo</a> extension would be useful..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://cowburn.info/2008/01/22/imagecreatefrom-string-remote/#comment-44330</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 03 Mar 2009 23:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://cowburn.info/php/imagecreatefrom-string-remote/#comment-44330</guid>
		<description>I too was glad to find the imagecreatefromstring() function. As many people seem to be doing, it is helpful for creating an image from a mySQL blob field.
However, eventually I need to echo the file back to a browser. This means creating the write MIME header of my own (header(&#039;Content-Type: image/filetype&#039;);) and calling one of imagefiletype($im);.
Once you have the image created, is there a way to determine its type? Would appreciate your input. Thanks!</description>
		<content:encoded><![CDATA[<p>I too was glad to find the imagecreatefromstring() function. As many people seem to be doing, it is helpful for creating an image from a mySQL blob field.<br />
However, eventually I need to echo the file back to a browser. This means creating the write MIME header of my own (header(&#8216;Content-Type: image/filetype&#8217;);) and calling one of imagefiletype($im);.<br />
Once you have the image created, is there a way to determine its type? Would appreciate your input. Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

