<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>PHP Thumb: Recent Topics</title>
<link>http://phpthumb.gxdlabs.com/forums/</link>
<description>Help, Suggestions, and General Discussion</description>
<language>en</language>
<pubDate>Sat, 31 Jul 2010 10:51:15 +0000</pubDate>

<item>
<title>banning on "Caching"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/caching#post-159</link>
<pubDate>Mon, 22 Mar 2010 17:23:25 +0000</pubDate>
<dc:creator>banning</dc:creator>
<guid isPermaLink="false">159@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;LOL i seen where someone asked about caching for another phpthumb library. HOWEVER, i assure you i am using your library :P&#60;/p&#62;
&#60;p&#62;Anyway i was curious is there a setting to enable caching in your library so that the images don't refresh every time i go to the site? If not do you have plans on implementing such a feature in the future?&#60;/p&#62;
&#60;p&#62;Signed,&#60;br /&#62;
A long time a dedicated user of your library, &#60;strong&#62;I LOVE IT&#60;/strong&#62; :) most usefully thing i have EVER found on the internet!
&#60;/p&#62;</description>
</item>
<item>
<title>banning on "localhost error "function.getimagesize: failed to open stream""</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/localhost-error-functiongetimagesize-failed-to-open-stream#post-143</link>
<pubDate>Tue, 08 Dec 2009 05:04:53 +0000</pubDate>
<dc:creator>banning</dc:creator>
<guid isPermaLink="false">143@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;I don't know why but on my current host I don't get an error when I use this script. AND on my old localhost here on my laptop I never got this error. But now that I got my new localhost and copied all my info over and what not I get this error and can't figure it out. I've tried to tweak the php.ini (memory_limit to be exact) file to get it to work &#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;/p&#62;
&#60;p&#62;Warning: getimagesize(http://localhost/path_to_image.../image.png) [function.getimagesize]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\path_to_php_thumb_resize\GdThumb.inc.php on line 1070&#60;/p&#62;
&#60;p&#62;Fatal error: Maximum execution time of 30 seconds exceeded in C:\path_to_php_thumb_resize\GdThumb.inc.php on line 1070&#60;/p&#62;
&#60;p&#62;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Anyway I realize you do this all for free and on your spare time so I REALLY appreciate any and all help you can give me :) thank you &#38;#38; thank you for this AMAZING script :)
&#60;/p&#62;</description>
</item>
<item>
<title>kapikua on "Weight change after the modification"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/weight-change-after-the-modification#post-154</link>
<pubDate>Wed, 10 Feb 2010 02:19:55 +0000</pubDate>
<dc:creator>kapikua</dc:creator>
<guid isPermaLink="false">154@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hello&#60;/p&#62;
&#60;p&#62;I'm using this application to a panel of pictures and when I get an image of 50 kb to the server and change the image size but weighs 100 kb.&#60;/p&#62;
&#60;p&#62;Example:&#60;/p&#62;
&#60;p&#62;I upload an image of 800 x 600 and weighs 70 kb. When set to size up the 500 x300 image and weighs 170 kb.&#60;/p&#62;
&#60;p&#62;Someone knows why could this happen?&#60;/p&#62;
&#60;p&#62;Thanks 4 help
&#60;/p&#62;</description>
</item>
<item>
<title>nikmauro on "CONVERTING COLOR IMAGES TO B&#038;W(GREYSCALE)"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/converting-color-images-to-b038wgreyscale#post-111</link>
<pubDate>Thu, 24 Sep 2009 00:06:56 +0000</pubDate>
<dc:creator>nikmauro</dc:creator>
<guid isPermaLink="false">111@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;hello it is possible to change the color of the image to monochrome or B/W ??&#60;/p&#62;
&#60;p&#62;CONVERTING COLOR IMAGES TO B&#38;#38;W(GREYSCALE)&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>gtraxx on "remove exif on picture"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/remove-exif-on-picture#post-152</link>
<pubDate>Wed, 03 Feb 2010 13:17:52 +0000</pubDate>
<dc:creator>gtraxx</dc:creator>
<guid isPermaLink="false">152@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hello I am trying to remove the EXIF data useless in the pictures!&#60;br /&#62;
Remove EXIF data will be really useful to create an image&#60;br /&#62;
An idea?&#60;br /&#62;
I love the project, I think integrating it into my framework&#60;/p&#62;
&#60;p&#62;Sorry for my english, i'm speak french :D
&#60;/p&#62;</description>
</item>
<item>
<title>leafy34 on "Header Restriction Errors"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/header-restriction-errors#post-147</link>
<pubDate>Wed, 13 Jan 2010 21:12:31 +0000</pubDate>
<dc:creator>leafy34</dc:creator>
<guid isPermaLink="false">147@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;&#60;strong&#62;UPDATE:&#60;/strong&#62; Found previous post, and was referred here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://trac.gxdlabs.com/projects/phpthumb/wiki/Docs/BasicUsage#ShowingImages&#34; rel=&#34;nofollow&#34;&#62;http://trac.gxdlabs.com/projects/phpthumb/wiki/Docs/BasicUsage#ShowingImages&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Hi there,&#60;/p&#62;
&#60;p&#62;First off, nice application, I am really looking forward to using its functionality except, I seem to run into an error with headers.&#60;/p&#62;
&#60;p&#62;Here is what I am thrown:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Fatal error: Uncaught exception 'RuntimeException' with message 'Cannot show image, headers have already been sent' in /home/user/public_html/domain/includes/GdThumb.inc.php:569 Stack trace: #0 /home/user/public_html/domain/testthis.php(9): GdThumb-&#38;gt;show() #1 {main} thrown in /home/user/public_html/domain/includes/GdThumb.inc.php on line 569&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Here is the code from the page &#34;testthis.php&#34;:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
&#38;lt;?php require_once('includes/ThumbLib.inc.php'); ?&#38;gt;&#60;br /&#62;
&#38;lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#38;gt;&#60;br /&#62;
&#38;lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#38;gt;&#60;br /&#62;
&#38;lt;head&#38;gt;&#38;lt;title&#38;gt;&#38;lt;/title&#38;gt;&#38;lt;/head&#38;gt;&#60;br /&#62;
&#38;lt;body&#38;gt;&#60;br /&#62;
&#38;lt;?php&#60;br /&#62;
$thumb = PhpThumbFactory::create('quotemark1.png');&#60;br /&#62;
$thumb-&#38;gt;resize(100, 100);&#60;br /&#62;
$thumb-&#38;gt;show();&#60;br /&#62;
?&#38;gt;&#60;br /&#62;
&#38;lt;/body&#38;gt;&#60;br /&#62;
&#38;lt;/html&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I really am unsure as to why this is happening, since there is no output before ThumbLib.inc.php is required.&#60;/p&#62;
&#60;p&#62;Any help will be very appreciated!&#60;br /&#62;
Cheers, Lea
&#60;/p&#62;</description>
</item>
<item>
<title>infowire on "Fatal error Call to a member function adaptiveResize() on a non-object"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/fatal-error-call-to-a-member-function-adaptiveresize-on-a-non-object#post-116</link>
<pubDate>Thu, 08 Oct 2009 03:58:02 +0000</pubDate>
<dc:creator>infowire</dc:creator>
<guid isPermaLink="false">116@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;I moved my servers from a DDS to a VDS... same OS and everything.  And for some reason cropping does not work now. I get an error:&#60;/p&#62;
&#60;p&#62;&#34;Fatal error: Call to a member function adaptiveResize() on a non-object in /home/millen/public_html/crop.php on line 18&#34;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.millenniumsunrooms.com/crop.php?pic=sunrooms/photo/11.jpg&#34;&#62;http://www.millenniumsunrooms.com/crop.php?pic=sunrooms/photo/11.jpg&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;crop.php looks like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php&#60;br /&#62;
$pic = $_GET['pic'];&#60;/p&#62;
&#60;p&#62;require_once 'ThumbLib.inc.php';&#60;/p&#62;
&#60;p&#62;try&#60;br /&#62;
{&#60;br /&#62;
     $thumb = PhpThumbFactory::create($pic);&#60;br /&#62;
}&#60;br /&#62;
catch (Exception $e)&#60;br /&#62;
{&#60;br /&#62;
     // handle error here however you'd like&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;$thumb-&#38;gt;adaptiveResize(238, 232);&#60;br /&#62;
$thumb-&#38;gt;show();&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I copied all the files over exactly the way they were.&#60;/p&#62;
&#60;p&#62;New Server: &#60;a href=&#34;http://66.90.103.163/~millen/info.php&#34;&#62;http://66.90.103.163/~millen/info.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Old Server: &#60;a href=&#34;http://66.90.104.118/~falcon/info.php&#34;&#62;http://66.90.104.118/~falcon/info.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It is supposed to re-size this picture:&#60;br /&#62;
&#60;a href=&#34;http://www.millenniumsunrooms.com/sunrooms/photo/11.jpg&#34;&#62;http://www.millenniumsunrooms.com/sunrooms/photo/11.jpg&#60;/a&#62;&#60;/p&#62;
&#60;p&#62; Where is the problem ?? &#60;/p&#62;
&#60;p&#62; Thank You In Advance
&#60;/p&#62;</description>
</item>
<item>
<title>jay on "Were do you set the maximum size for the image upload??"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/were-do-you-set-the-maximum-size-for-the-image-upload#post-140</link>
<pubDate>Sat, 28 Nov 2009 19:30:40 +0000</pubDate>
<dc:creator>jay</dc:creator>
<guid isPermaLink="false">140@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Were do you set the maximum size for the image upload??
&#60;/p&#62;</description>
</item>
<item>
<title>Ian on "Spammers Ruin Everything (Why You Can't Register) - Updated"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/spammers-ruin-everything-why-you-cant-register#post-139</link>
<pubDate>Wed, 25 Nov 2009 11:18:57 +0000</pubDate>
<dc:creator>Ian</dc:creator>
<guid isPermaLink="false">139@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Sooooo, it looks like somebody's hi-jacked my domain (or something) and that's why some people are experiencing issues registering... basically, google (and others I'm sure) are blocking emails from this machine due to a &#34;large amount of unsolicited mail&#34;.&#60;/p&#62;
&#60;p&#62;I'm currently working on this, but if you need support, you can always file tickets on github: &#60;a href=&#34;http://github.com/masterexploder/PHPThumb/issues&#34; rel=&#34;nofollow&#34;&#62;http://github.com/masterexploder/PHPThumb/issues&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You may need to create a github account to do so.&#60;/p&#62;
&#60;p&#62;Sorry for the inconvenience this causes.  I'm also highly considering shutting down these forums as I really don't care to, or want to deal with any kind of spam-related headaches.&#60;/p&#62;
&#60;p&#62;UPDATE:  Figured out what the problem was, so emails might start to trickle out soon.  Give it a few days, and I'd imagine registration will start working again.
&#60;/p&#62;</description>
</item>
<item>
<title>Ian on "Changed My GitHub Username"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/changed-my-github-username#post-138</link>
<pubDate>Wed, 18 Nov 2009 21:54:55 +0000</pubDate>
<dc:creator>Ian</dc:creator>
<guid isPermaLink="false">138@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;A few people have started following me (you guys rock), so I figured some of you may be visiting my github account and would like to know I've changed my username from &#34;iselby&#34; to &#34;masterexploder&#34;.  Why, because it's awesome... that's why :)&#60;/p&#62;
&#60;p&#62;Check it: &#60;a href=&#34;http://github.com/masterexploder&#34; rel=&#34;nofollow&#34;&#62;http://github.com/masterexploder&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>leandono on "Rounded Corners plugin (no transparent)"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/rounded-corners-plugin-no-transparent#post-135</link>
<pubDate>Mon, 16 Nov 2009 17:45:50 +0000</pubDate>
<dc:creator>leandono</dc:creator>
<guid isPermaLink="false">135@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;&#60;strong&#62;[Alpha Version]&#60;/strong&#62;&#60;br /&#62;
This plugin create rounded corners. Based on:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://911-need-code-help.blogspot.com/2009/05/generate-images-with-round-corners-on.html&#34;&#62;Apply Rounded Corners to Images On-The-Fly Using PHP and GD Library&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;&#60;br /&#62;
The code generates a mask for the top-right corner by drawing a transparent circle over colored background. This mask is then rotated and superimposed on the specified image four times.&#60;br /&#62;
&#60;/blockquote&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>Frosty on "Image caching?"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/image-caching#post-131</link>
<pubDate>Wed, 11 Nov 2009 04:26:01 +0000</pubDate>
<dc:creator>Frosty</dc:creator>
<guid isPermaLink="false">131@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi, in previous versions of PHPThumb the image caching was a really great feature, but in version 3.x I can't seem to find this feature anywhere.&#60;/p&#62;
&#60;p&#62;On some slower servers the caching is a really nice feature to have.&#60;/p&#62;
&#60;p&#62;Am I not using the software correctly, or is it actually missing from version 3?&#60;/p&#62;
&#60;p&#62;If it's missing, are there any plans to introduce it?&#60;/p&#62;
&#60;p&#62;Whilst leaving this message, I'd like to say what a great bit of software I think php Thumb is.&#60;/p&#62;
&#60;p&#62;Laurence
&#60;/p&#62;</description>
</item>
<item>
<title>Ian on "Migrating to GitHub"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/migrating-to-github#post-130</link>
<pubDate>Mon, 26 Oct 2009 16:21:33 +0000</pubDate>
<dc:creator>Ian</dc:creator>
<guid isPermaLink="false">130@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Just a quick note that I'm in the process of migrating this project to GitHub.&#60;/p&#62;
&#60;p&#62;I'm doing this for a couple of reasons:&#60;br /&#62;
&#60;ul&#62;&#60;li&#62;Spam - The current issue tracker (trac) gets a TON of spam.  This sucks.  Since GitHub has integrated issue tracking, I can now use that!&#60;/li&#62;&#60;li&#62;Wiki - It's got an integrated wiki, which anyone can help keep up to date or expand on.  Collaboration is fun!&#60;/li&#62;&#60;li&#62;Git - Git's awesome... GitHub makes it easier for other people to work on the code and contribute as well.  I think it's a better system all-around, especially for open-source projects&#60;/li&#62;&#60;br /&#62;
&#60;/ul&#62;&#60;/p&#62;
&#60;p&#62;I'll be updating various links and stuff as the migration progresses, but for now you can visit the new project at: &#60;a href=&#34;http://github.com/masterexploder/PHPThumb&#34; rel=&#34;nofollow&#34;&#62;http://github.com/masterexploder/PHPThumb&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>skyzyx on "Feature Request: Memory-only images"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/feature-request-memory-only-images#post-125</link>
<pubDate>Fri, 16 Oct 2009 23:23:36 +0000</pubDate>
<dc:creator>skyzyx</dc:creator>
<guid isPermaLink="false">125@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;I'm probably a special case in that I'm doing some nutty things with Amazon S3, but I'd like to be able to use an S3 class to fetch the binary image data, pass that into PHPThumb, and (besides show and save) add a third option for returning the processed binary image data to a variable that I can use to write back to S3.&#60;/p&#62;
&#60;p&#62;Basically, I'd like the entire resizing/converting process to happen in memory, so that I can pull from (and push to) S3 without having to create temporary files on disk or be forced to output them to the buffer.&#60;/p&#62;
&#60;p&#62;Within a few minutes I was able to write a plugin that did the memory output, but I don't seem to be able to pass image data in without hacking on the core library — and that's not something I want to have to do.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>diegotdai on "PhpThumb and Zend Framework integration"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/phpthumb-and-zend-framework-integration#post-128</link>
<pubDate>Sat, 24 Oct 2009 00:48:11 +0000</pubDate>
<dc:creator>diegotdai</dc:creator>
<guid isPermaLink="false">128@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;I'm trying to integrate PhpThumb with Zend Framework. I'm having some troubles though, does anyone have done this or have any reference which I can look at...&#60;/p&#62;
&#60;p&#62;Cheers
&#60;/p&#62;</description>
</item>
<item>
<title>darkfenix90 on "php thumb and cake php"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/php-thumb-and-cake-php#post-127</link>
<pubDate>Thu, 22 Oct 2009 03:44:31 +0000</pubDate>
<dc:creator>darkfenix90</dc:creator>
<guid isPermaLink="false">127@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi, is there a way I can use php thumb with the framework cakephp? Are there some examples? Thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>OrderByRand on "How save converted image into MySQL (blob)"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/how-save-converted-image-into-mysql-blob#post-123</link>
<pubDate>Mon, 12 Oct 2009 11:51:55 +0000</pubDate>
<dc:creator>OrderByRand</dc:creator>
<guid isPermaLink="false">123@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Welcome,&#60;/p&#62;
&#60;p&#62;I would ask two question.&#60;/p&#62;
&#60;p&#62;First, how can i convert image into string &#60;em&#62;then save to MySQL.&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;I have try following but without positive result. ( i think its foul of headers).&#60;/p&#62;
&#60;p&#62;&#60;code&#62; ob_start();&#60;br /&#62;
 $thumb-&#38;gt;show();&#60;br /&#62;
 $out = ob_get_clean();&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Second, how force to use output format ?&#60;br /&#62;
I want store output images in JPG format.&#60;/p&#62;
&#60;p&#62;Please excuse my language
&#60;/p&#62;</description>
</item>
<item>
<title>RB on "watermark plugin"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/watermark-plugin#post-115</link>
<pubDate>Thu, 01 Oct 2009 20:47:16 +0000</pubDate>
<dc:creator>RB</dc:creator>
<guid isPermaLink="false">115@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;&#60;strong&#62;File name&#60;/strong&#62; gd_watermark.inc.php&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php&#60;/p&#62;
&#60;p&#62;class GdWatermarkLib&#60;br /&#62;
{&#60;br /&#62;
	/**&#60;br /&#62;
	* Instance of GdThumb passed to this class&#60;br /&#62;
	*&#60;br /&#62;
	* @var GdThumb&#60;br /&#62;
	*/&#60;br /&#62;
		protected $parentInstance;&#60;br /&#62;
		protected $currentDimensions;&#60;br /&#62;
		protected $workingImage;&#60;br /&#62;
		protected $newImage;&#60;br /&#62;
		protected $options;&#60;/p&#62;
&#60;p&#62;		public function createWatermark ($mask_file, $mask_position='cc', $mask_padding=0, &#38;#38;$that)&#60;br /&#62;
		{&#60;br /&#62;
			// bring stuff from the parent class into this class...&#60;br /&#62;
			$this-&#38;gt;parentInstance           = $that;&#60;br /&#62;
			$this-&#38;gt;currentDimensions        = $this-&#38;gt;parentInstance-&#38;gt;getCurrentDimensions();&#60;br /&#62;
			$this-&#38;gt;workingImage             = $this-&#38;gt;parentInstance-&#38;gt;getWorkingImage();&#60;br /&#62;
			$this-&#38;gt;newImage                 = $this-&#38;gt;parentInstance-&#38;gt;getOldImage();&#60;br /&#62;
			$this-&#38;gt;options                  = $this-&#38;gt;parentInstance-&#38;gt;getOptions();&#60;/p&#62;
&#60;p&#62;			$this-&#38;gt;mask_file                = $mask_file;&#60;br /&#62;
			$this-&#38;gt;mask_position            = $mask_position;&#60;br /&#62;
			$this-&#38;gt;mask_padding             = $mask_padding;&#60;/p&#62;
&#60;p&#62;			$canvas_width				    = $this-&#38;gt;currentDimensions['width'];&#60;br /&#62;
			$canvas_height				    = $this-&#38;gt;currentDimensions['height'];&#60;/p&#62;
&#60;p&#62;			if ($canvas_width &#38;lt;= 200 &#124;&#124; $canvas_height &#38;lt;= 200) {&#60;br /&#62;
				return $that;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;			list($stamp_width, $stamp_height, $stamp_type, $stamp_attr) = getimagesize($mask_file);&#60;/p&#62;
&#60;p&#62;			switch ($stamp_type) {&#60;br /&#62;
				case 1:&#60;br /&#62;
					$stamp_image = imagecreatefromgif($mask_file);&#60;br /&#62;
					break;&#60;br /&#62;
				case 2:&#60;br /&#62;
					@ini_set('gd.jpeg_ignore_warning', 1);&#60;br /&#62;
					$stamp_image = imagecreatefromjpeg($mask_file);&#60;br /&#62;
					break;&#60;br /&#62;
				case 3:&#60;br /&#62;
					$stamp_image = imagecreatefrompng($mask_file);&#60;br /&#62;
					break;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;			imagealphablending($this-&#38;gt;workingImage, true);&#60;/p&#62;
&#60;p&#62;			if ($stamp_width &#38;gt; $canvas_width &#124;&#124; $stamp_height &#38;gt; $canvas_height) {&#60;br /&#62;
				// some simple resize math&#60;br /&#62;
				//$water_resize_factor  = round($canvas_width / $stamp_width);&#60;br /&#62;
				$water_resize_factor  = 0.5;&#60;br /&#62;
				$new_mask_width  = $stamp_width  * $water_resize_factor;&#60;br /&#62;
				$new_mask_height = $stamp_height * $water_resize_factor;&#60;br /&#62;
				$mask_padding    = $mask_padding * $water_resize_factor;&#60;br /&#62;
				// the new watermark creation takes place starting from here&#60;br /&#62;
				$new_mask_image = imagecreatetruecolor($new_mask_width , $new_mask_height);&#60;br /&#62;
				// imagealphablending is important in order to keep, our png image (the watewrmark) transparent&#60;br /&#62;
				imagealphablending($new_mask_image , false);&#60;br /&#62;
				imagecopyresampled(&#60;br /&#62;
					$new_mask_image , $stamp_image, 0, 0, 0, 0,&#60;br /&#62;
					$new_mask_width,  $new_mask_height,&#60;br /&#62;
					$stamp_width,     $stamp_height&#60;br /&#62;
				);&#60;br /&#62;
				// assign the new values to the old variables&#60;br /&#62;
				$stamp_width  = $new_mask_width;&#60;br /&#62;
				$stamp_height = $new_mask_height;&#60;br /&#62;
				$stamp_image   = $new_mask_image;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;			switch($mask_position) {&#60;br /&#62;
				case 'cc':&#60;br /&#62;
					// Center&#60;br /&#62;
					$start_width 	= 	round(($canvas_width - $stamp_width) / 2);&#60;br /&#62;
					$start_height 	= 	round(($canvas_height - $stamp_height) / 2);&#60;br /&#62;
					break;&#60;br /&#62;
				case 'lt':&#60;br /&#62;
					// Left Top&#60;br /&#62;
					$start_width 	= 	$mask_padding;&#60;br /&#62;
					$start_height 	= 	$mask_padding;&#60;br /&#62;
					break;&#60;br /&#62;
				case 'rt':&#60;br /&#62;
					// Right Top&#60;br /&#62;
					$start_width 	= 	$canvas_width - $mask_padding - $stamp_width;&#60;br /&#62;
					$start_height 	= 	$mask_padding;&#60;br /&#62;
					break;&#60;br /&#62;
				case 'lb':&#60;br /&#62;
					// Left Bottom&#60;br /&#62;
					$start_width 	= 	$mask_padding;&#60;br /&#62;
					$start_height 	= 	$canvas_height - $mask_padding - $stamp_height;&#60;br /&#62;
					break;&#60;br /&#62;
				case 'rb':&#60;br /&#62;
					// Right Bottom&#60;br /&#62;
					$start_width 	= 	$canvas_width - $mask_padding - $stamp_width;&#60;br /&#62;
					$start_height 	= 	$canvas_height - $mask_padding - $stamp_height;&#60;br /&#62;
					break;&#60;br /&#62;
				case 'cb':&#60;br /&#62;
					// Center Bottom&#60;br /&#62;
					$start_width 	= 	round(($canvas_width - $stamp_width) / 2);&#60;br /&#62;
					$start_height 	= 	$canvas_height - $mask_padding - $stamp_height;&#60;br /&#62;
					break;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;			imagecopy( $this-&#38;gt;workingImage, $stamp_image, $start_width, $start_height, 0, 0, $stamp_width, $stamp_height );&#60;br /&#62;
			imagedestroy( $stamp_image );&#60;/p&#62;
&#60;p&#62;			return $that;&#60;br /&#62;
        }&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;$pt = PhpThumb::getInstance();&#60;br /&#62;
$pt-&#38;gt;registerPlugin('GdWatermarkLib', 'gd');&#60;br /&#62;
?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;//------------------&#60;br /&#62;
$thumb = PhpThumbFactory::create($src);&#60;br /&#62;
$thumb-&#38;gt;adaptiveResize($width, $height);&#60;br /&#62;
$thumb-&#38;gt;createWatermark($mark_image, $position, $padding);&#60;br /&#62;
$thumb-&#38;gt;show();&#60;/p&#62;
&#60;p&#62;//------------------&#60;br /&#62;
$mark_image = 'path/to/mark.png'&#60;br /&#62;
$position =&#60;br /&#62;
&#60;ul&#62;&#60;li&#62;cc = center center&#60;/li&#62;&#60;li&#62;lt = left top&#60;/li&#62;&#60;li&#62;rt = right top&#60;/li&#62;&#60;li&#62;lb = left bottom&#60;/li&#62;&#60;li&#62;rb = right bottom&#60;/li&#62;&#60;li&#62;cb = center bottom&#60;/li&#62;&#60;br /&#62;
&#60;/ul&#62;&#60;br /&#62;
$padding = number like 10 = padding 10px
&#60;/p&#62;</description>
</item>
<item>
<title>skunker on "IE browser hangs when using phpthumb. Known issue?"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/ie-browser-hangs-when-using-phpthumb-known-issue#post-69</link>
<pubDate>Wed, 29 Jul 2009 13:56:58 +0000</pubDate>
<dc:creator>skunker</dc:creator>
<guid isPermaLink="false">69@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;I use a wordpress theme that makes use of phpthumb for its thumbnail generation. I noticed that in Microsoft Internet Explorer, the page with the generated thumbnails never finishes loading the page. The problem is that in the IE browser, it seems that the browser hangs when loading pages that have thumbnails. For example, go to this link and watch the browser status bar never finish!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.georgeramirezphotography.com/new/?cat=5&#34; rel=&#34;nofollow&#34;&#62;http://www.georgeramirezphotography.com/new/?cat=5&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Does anyone have any clue on what is happening? How can I fix this problem? Thanks so much, it has been bugging me.
&#60;/p&#62;</description>
</item>
<item>
<title>shockerusa on "PHP Version 5.3.0 Issues"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/php-version-530-issues#post-86</link>
<pubDate>Mon, 17 Aug 2009 19:44:07 +0000</pubDate>
<dc:creator>shockerusa</dc:creator>
<guid isPermaLink="false">86@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;In my error log, I'm getting these errors. The result of this, is that the plugins don't work anymore.&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;PHP Notice:  Undefined index: JPG Support in /home/images/public_html/functions/GdThumb.inc.php on line 1080&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;and&#60;br /&#62;
&#60;blockquote&#62;PHP Warning:  Parameter 6 to GdReflectionLib::createReflection() expected to be a reference, value given in /home/images/public_html/functions/ThumbBase.inc.php on line 197&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;Any ideas how to fix these issues?&#60;/p&#62;
&#60;p&#62;Notes: I'm using your latest version.&#60;br /&#62;
PHP 5.3&#60;br /&#62;
GD 2.0.34 &#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Justin
&#60;/p&#62;</description>
</item>
<item>
<title>Danielpk on "Suggest a fix."</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/suggest-a-fix#post-112</link>
<pubDate>Thu, 24 Sep 2009 16:53:58 +0000</pubDate>
<dc:creator>Danielpk</dc:creator>
<guid isPermaLink="false">112@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Well, i using this with CakePHP and i got this NOTICE:&#60;/p&#62;
&#60;p&#62;&#60;blockquote&#62;Notice (8): Undefined index: JPG Support [APP\vendors\phpThumb\GdThumb.inc.php, line 1080]&#60;br /&#62;
&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;So for fix it i did:&#60;br /&#62;
&#60;code&#62;case 'JPG':&#60;br /&#62;
                                $isCompatible = (isset($gdInfo['JPG Support'])) ? $gdInfo['JPG Support'] : $gdInfo['JPEG Support'];&#60;br /&#62;
                                break;&#60;br /&#62;
			case 'PNG':&#60;br /&#62;
				$isCompatible = $gdInfo['PNG Support'];&#60;br /&#62;
				break;&#60;/code&#62;&#60;br /&#62;
The problem was that gdInfo dont had JPG Support index.&#60;/p&#62;
&#60;p&#62;I wish that it help...
&#60;/p&#62;</description>
</item>
<item>
<title>phillw on "XHTML Strict &#038; phpthumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/xhtml-strict-038-phpthumbs#post-105</link>
<pubDate>Mon, 21 Sep 2009 13:13:52 +0000</pubDate>
<dc:creator>phillw</dc:creator>
<guid isPermaLink="false">105@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Glad to see you are compliant ..... however, I have a small problem ....&#60;/p&#62;
&#60;p&#62;Your code wishes to issue &#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
public function show ()&#60;br /&#62;
	{&#60;br /&#62;
		if (headers_sent())&#60;br /&#62;
		{&#60;br /&#62;
			throw new RuntimeException('Cannot show image, headers have already been sent');&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		switch ($this-&#38;gt;format)&#60;br /&#62;
		{&#60;br /&#62;
			case 'GIF':&#60;br /&#62;
				header('Content-type: image/gif');&#60;br /&#62;
				imagegif($this-&#38;gt;oldImage);&#60;br /&#62;
				break;&#60;br /&#62;
			case 'JPG':&#60;br /&#62;
				header('Content-type: image/jpeg');&#60;br /&#62;
				imagejpeg($this-&#38;gt;oldImage, null, $this-&#38;gt;options['jpegQuality']);&#60;br /&#62;
				break;&#60;br /&#62;
			case 'PNG':&#60;br /&#62;
				header('Content-type: image/png');&#60;br /&#62;
				imagepng($this-&#38;gt;oldImage);&#60;br /&#62;
				break;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		return $this;&#60;br /&#62;
	}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And my Code for XHTML compliance (and various meta-tags) has already issued this little lot at the start of each page ......&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
$charset = &#34;utf-8&#34;;&#60;br /&#62;
$mime = &#34;text/html&#34;;&#60;br /&#62;
# NOTE: To allow for q-values with one space (text/html; q=0.5),&#60;br /&#62;
# use the following regex:&#60;br /&#62;
# &#34;/text\/html;[\ ]{0,1}q=([0-1]{0,1}\.\d{0,4})/i&#34;&#60;br /&#62;
if((isset($_SERVER[&#34;HTTP_ACCEPT&#34;])) &#38;#38;&#38;#38; (stristr($_SERVER[&#34;HTTP_ACCEPT&#34;],&#34;application/xhtml+xml&#34;)))  {&#60;br /&#62;
   if(preg_match(&#34;/application\/xhtml\+xml;q=([0-1]{0,1}\.\d{0,4})/i&#34;,$_SERVER[&#34;HTTP_ACCEPT&#34;],$matches)) {&#60;br /&#62;
      $xhtml_q = $matches[1];&#60;br /&#62;
      if(preg_match(&#34;/text\/html;q=([0-1]{0,1}\.\d{0,4})/i&#34;,$_SERVER[&#34;HTTP_ACCEPT&#34;],$matches)) {&#60;br /&#62;
         $html_q = $matches[1];&#60;br /&#62;
         if((float)$xhtml_q &#38;gt;= (float)$html_q)&#60;br /&#62;
            $mime = &#34;application/xhtml+xml&#34;;&#60;br /&#62;
      }&#60;br /&#62;
   }&#60;br /&#62;
   else&#60;br /&#62;
	  $mime = &#34;application/xhtml+xml&#34;;&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;br /&#62;
&#38;lt;!DOCTYPE html&#60;br /&#62;
     PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34;&#60;br /&#62;
     &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#38;gt;&#60;br /&#62;
&#38;lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34; xml:lang=&#34;en&#34; lang=&#34;en&#34;&#38;gt;&#60;br /&#62;
&#38;lt;head&#38;gt;&#60;br /&#62;
&#38;lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;&#38;lt;?php echo $mime ?&#38;gt;;charset=&#38;lt;?php echo $charset ?&#38;gt;&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;!--  The lines below are for CSS - On my sites I have the two classes,&#60;br /&#62;
 You may only have media, or you may need one for mobile (cell) phones - add / remove as you wish --&#38;gt;&#60;br /&#62;
&#38;lt;meta http-equiv=&#34;Content-Style-Type&#34; content=&#34;text/css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;link rel=&#34;stylesheet&#34; media=&#34;screen&#34; type=&#34;text/css&#34; href=&#34;/mgjuddltd/html/mgj.css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;link rel=&#34;stylesheet&#34; media=&#34;print&#34; type=&#34;text/css&#34; href=&#34;/mgjuddltd/html/mgj_print.css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;description&#34; content=&#34;hire plant parts, spares engineering services&#34;/&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;keywords&#34; content=&#34;keys, locks, engine, parts, hire, plant, services, engineering,&#60;br /&#62;
consumables,&#34;/&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;copyright&#34; content=&#34;M.G. Judd Ltd., 2009. All rights Reserved.&#34;/&#38;gt;&#60;br /&#62;
&#38;lt;meta name=&#34;no-email-collection&#34; content=&#34;http://www.unspam.com/noemailcollection&#34; /&#38;gt;&#60;/p&#62;
&#60;p&#62;&#38;lt;/head&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I'm still pretty new to this strict encoding, whilst trying to look after non-xhtml browsers - I'm not too sure how to get around the issuing of a &#34;content-type:&#34; to your specific requirements....&#60;/p&#62;
&#60;p&#62;I'm sorta guessing that &#60;strong&#62;&#60;em&#62;most&#60;/em&#62;&#60;/strong&#62; browsers can handle&#60;br /&#62;
jpgs &#38;#38; gifs - w3c has this to say on the matter....&#60;br /&#62;
&#60;blockquote&#62;Attributes of this type identify the allowable content type(s) of an associated URI (usually a value of another attribute on the same element). At its most general, it is a comma-separated list of media ranges with optional accept parameters, as defined in section 14.1 of [RFC2616] as the field value of the accept request header.&#60;/p&#62;
&#60;p&#62;In its simplest case, this is just a media type, such as &#34;image/png&#34; or &#34;application/xml&#34;, but it may also contain asterisks, such as &#34;image/*&#34; or &#34;*/*&#34;, or lists of acceptable media types, such as &#34;image/png, image/gif, image/jpeg&#34;.&#60;/p&#62;
&#60;p&#62;The user agent must combine this list with its own list of acceptable media types by taking the intersection, and then use the resulting list as the field value of the accept request header when requesting the resource using HTTP.&#60;/p&#62;
&#60;p&#62;For instance, if the attribute specifies the value &#34;image/png, image/gif, image/jpeg&#34;, but the user agent does not accept images of type &#34;image/gif&#34; then the resultant accept header would contain &#34;image/png, image/jpeg&#34;.&#60;/p&#62;
&#60;p&#62;A user agent must imitate similar behavior when using other methods than HTTP. For instance, when accessing files in a local filestore, &#38;lt;p src=&#34;logo&#34; srctype=&#34;image/png, image/jpeg&#34;&#38;gt; might cause the user agent first to look for a file logo.png, and then for logo.jpg.&#60;/p&#62;
&#60;p&#62;If a value for the content type is not given, &#34;*/*&#34; must be used for its value.&#60;/p&#62;
&#60;p&#62;For the current list of registered content types, please consult [MIMETYPES].&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;So, placing a &#60;code&#62;In its simplest case, this is just a media type, such as &#34;image/png&#34; or &#34;application/xml&#34;, but it may also contain asterisks, such as &#34;image/*&#34; or &#34;*/*&#34;, or lists of acceptable media types, such as &#34;image/png, image/gif, image/jpeg&#34;.&#60;br /&#62;
&#60;/code&#62; type statement would keep me in alignment with the rules - My question then is, what would be, if any, the effect of removing the code from your library with those directives in ?&#60;/p&#62;
&#60;p&#62;-- Yeah, I know I'm a pain in the ass, but, please try to see it my way - I already have a header section to look after all my pages, and I would be most pleased to be able to adapt to use your fantastic php-code.&#60;/p&#62;
&#60;p&#62;Regards,&#60;/p&#62;
&#60;p&#62;Phill.
&#60;/p&#62;</description>
</item>
<item>
<title>idragon on "Displaying Thumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/displaying-thumbs#post-101</link>
<pubDate>Tue, 15 Sep 2009 11:11:47 +0000</pubDate>
<dc:creator>idragon</dc:creator>
<guid isPermaLink="false">101@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi Guys,&#60;/p&#62;
&#60;p&#62;I need some help, and somewhat newbie in php but i get along usually.&#60;/p&#62;
&#60;p&#62;I have a special field for image classes, so i want to resize them with &#60;a href=&#34;http://www.site.com/show_imagex.php?file=%field%&#34; rel=&#34;nofollow&#34;&#62;http://www.site.com/show_imagex.php?file=%field%&#60;/a&#62; this works in my code but i have lots of images, around 20+ per page, so i think it takes a hit on the server. So i was thinking to save them and display them, something like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php&#60;/p&#62;
&#60;p&#62;require_once 'ThumbLib.inc.php';&#60;/p&#62;
&#60;p&#62;$fileName = (isset($_GET['file'])) ? urldecode($_GET['file']) : null;&#60;/p&#62;
&#60;p&#62;if ($fileName === null &#124;&#124; !file_exists($fileName))&#60;br /&#62;
{&#60;br /&#62;
	echo &#34;&#38;lt;p&#38;gt;imagine lipsa&#38;lt;/p&#38;gt;&#34;;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;try&#60;br /&#62;
{&#60;br /&#62;
     $thumb = PhpThumbFactory::create($fileName);&#60;br /&#62;
}&#60;br /&#62;
catch (Exception $e)&#60;br /&#62;
{&#60;br /&#62;
     echo &#34;&#38;lt;p&#38;gt;exception&#38;lt;/p&#38;gt;&#34;;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;if(!file_exists('static/'.$fileName))&#60;br /&#62;
{&#60;/p&#62;
&#60;p&#62;$thumb-&#38;gt;adaptiveResize(170, 80);&#60;/p&#62;
&#60;p&#62;$thumb-&#38;gt;save('static/'.$fileName);&#60;br /&#62;
}&#60;br /&#62;
$new = PhpThumbFactory::create('static/'.$fileName);&#60;/p&#62;
&#60;p&#62;if(file_exists('static/'.$fileName))&#60;br /&#62;
{&#60;/p&#62;
&#60;p&#62;$new-&#38;gt;show();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;So basically get the field name, save in static, and show it. Now i dont know if this uses resources each time i call it, to create a new thumb, or it takes it from static.&#60;/p&#62;
&#60;p&#62;Any suggestions?
&#60;/p&#62;</description>
</item>
<item>
<title>maniac on "save multiple thumbnails"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/save-multiple-thumbnails#post-62</link>
<pubDate>Wed, 22 Jul 2009 03:52:47 +0000</pubDate>
<dc:creator>maniac</dc:creator>
<guid isPermaLink="false">62@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi, I want to save multiple thumbnails from each image with several sizes:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
$image = PhpThumbFactory::create($image);&#60;br /&#62;
$thmb_panel = $image-&#38;gt;adaptiveResize(79,79)-&#38;gt;save($destino.&#34;/thmb.jpg&#34;);&#60;br /&#62;
$thmb_fend = $image-&#38;gt;adaptiveResize(237, 180)-&#38;gt;save($destino.&#34;/fend.jpg&#34;);&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;The problem is $thmb_fend saves with 79x79px like $thmb_panel.&#60;/p&#62;
&#60;p&#62;Any suggestions?&#60;br /&#62;
Thanks for the great class :)
&#60;/p&#62;</description>
</item>
<item>
<title>skyzyx on "Pull from SVN repo"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/pull-from-svn-repo#post-46</link>
<pubDate>Thu, 09 Jul 2009 16:36:33 +0000</pubDate>
<dc:creator>skyzyx</dc:creator>
<guid isPermaLink="false">46@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Rather than having to download, unzip, shuffle files, and commit a new version into my project's repository, it'd be much nicer to simply pull an SVN &#34;tag&#34; into my project directly as an svn:external.&#60;/p&#62;
&#60;p&#62;This requires very little effort on your part, but would be a huge value to developers like me. Whenever you create a new release, stick it in a versioned sub-folder of the &#34;tags&#34; or &#34;releases&#34; directories (e.g. /svn/tags/3.0.53).&#60;/p&#62;
&#60;p&#62;It would appear that the current version of the software exists only in the trunk, sticking me in the unfavorable position of having to worry about broken builds if I &#60;code&#62;svn up&#60;/code&#62; my svn:externals.&#60;/p&#62;
&#60;p&#62;Any chance of releases being organized this way?
&#60;/p&#62;</description>
</item>
<item>
<title>tronics on "preserve transparency in png and gif"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/preserve-transparency-in-png-and-gif#post-85</link>
<pubDate>Sun, 16 Aug 2009 14:59:44 +0000</pubDate>
<dc:creator>tronics</dc:creator>
<guid isPermaLink="false">85@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hello!&#60;/p&#62;
&#60;p&#62;Everything works very well so far, but I found problems with transparency.&#60;/p&#62;
&#60;p&#62;$_filename=&#34;nicename.png&#34;;&#60;br /&#62;
$format=&#34;png&#34;;&#60;br /&#62;
$thumb-&#38;gt;resize($width,$height')-&#38;gt;save($_filename,$format);&#60;br /&#62;
$thumb = PhpThumbFactory::create($_filename);//take the cached Thumb.&#60;br /&#62;
$thumb-&#38;gt;show();  &#60;/p&#62;
&#60;p&#62;When I tried to resize and save this image here with png and transparency it turns out to have a black background (the same as when saved in jpg Format)&#60;/p&#62;
&#60;p&#62;Try this image to test it:&#60;br /&#62;
&#60;a href=&#34;http://www.atomikframework.com/assets/images/logo.png&#34; rel=&#34;nofollow&#34;&#62;http://www.atomikframework.com/assets/images/logo.png&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Do I make any mistake, or is this a bug?&#60;/p&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
</item>
<item>
<title>fametown on "Resize only width or height"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/resize-only-width-or-height#post-96</link>
<pubDate>Thu, 10 Sep 2009 05:20:15 +0000</pubDate>
<dc:creator>fametown</dc:creator>
<guid isPermaLink="false">96@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi!&#60;/p&#62;
&#60;p&#62;Sorry if my english is not very good. :) I'm a spanish web developer.&#60;/p&#62;
&#60;p&#62;I love your thumb tool, a great piece of software! but i need 2 little modifications to make it perfect for me. &#60;/p&#62;
&#60;p&#62;First... i want resize my thumb with only the &#34;WIDTH&#34; value or only the &#34;HEIGHT&#34; value.&#60;/p&#62;
&#60;p&#62;For example in a 800x600 picture, i resize the height to 100 (height = 100 and width = 133) and then crop in X=0 and Y=0 to 100x100 thumbnail.&#60;/p&#62;
&#60;p&#62;And finally... a parameter to apply a &#34;Unsharp Mask&#34; to the thumbmails (you can take the code here &#60;a href=&#34;http://vikjavev.no/computing/ump.php&#34; rel=&#34;nofollow&#34;&#62;http://vikjavev.no/computing/ump.php&#60;/a&#62;).&#60;/p&#62;
&#60;p&#62;Thanks a lot :)
&#60;/p&#62;</description>
</item>
<item>
<title>shockerusa on "Plugin: Watermarking Issue"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/plugin-watermarking-issue#post-2</link>
<pubDate>Thu, 11 Jun 2009 16:53:50 +0000</pubDate>
<dc:creator>shockerusa</dc:creator>
<guid isPermaLink="false">2@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I'm trying to create an plugin to watermark images, however i'm running into a problem.&#60;/p&#62;
&#60;p&#62;My goal is to keep the orginal size images and just watermark them, while also creating thumbnails of them.&#60;br /&#62;
The problem is when I'm trying to watermark them and save them, php throws an warning.&#60;/p&#62;
&#60;p&#62;Here is my code for the plugin:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
class GdWatermarkLib&#60;br /&#62;
{&#60;br /&#62;
	/**&#60;br /&#62;
	 * Instance of GdThumb passed to this class&#60;br /&#62;
	 *&#60;br /&#62;
	 * @var GdThumb&#60;br /&#62;
	 */&#60;br /&#62;
	protected $parentInstance;&#60;br /&#62;
	protected $currentDimensions;&#60;br /&#62;
	protected $workingImage;&#60;br /&#62;
	protected $newImage;&#60;br /&#62;
	protected $options;&#60;/p&#62;
&#60;p&#62;	public function createWatermark ($watermark, &#38;#38;$that)&#60;br /&#62;
	{&#60;br /&#62;
		// bring stuff from the parent class into this class...&#60;br /&#62;
		$this-&#38;gt;parentInstance 		= $that;&#60;br /&#62;
		$this-&#38;gt;currentDimensions 	= $this-&#38;gt;parentInstance-&#38;gt;getCurrentDimensions();&#60;br /&#62;
		$this-&#38;gt;workingImage			= $this-&#38;gt;parentInstance-&#38;gt;getWorkingImage();&#60;/p&#62;
&#60;p&#62;		$width				= $this-&#38;gt;currentDimensions['width'];&#60;br /&#62;
		$height				= $this-&#38;gt;currentDimensions['height'];&#60;/p&#62;
&#60;p&#62;	$watermarksize = getimagesize($watermark);&#60;br /&#62;
	$dest_x = $width - $watermarksize[0] - 5;&#60;br /&#62;
	$dest_y = $height - $watermarksize[1] - 5; &#60;/p&#62;
&#60;p&#62;		$watermark = imagecreatefromjpeg($watermark);&#60;br /&#62;
		imagecopymerge($this-&#38;gt;workingImage, $watermark, $dest_x, $dest_y, 0, 0, $watermarksize[0], $watermarksize[1], 100);  &#60;/p&#62;
&#60;p&#62;		return $that;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;}&#60;/p&#62;
&#60;p&#62;$pt = PhpThumb::getInstance();&#60;br /&#62;
$pt-&#38;gt;registerPlugin('GdWatermarkLib', 'gd');&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Here are my lines of code to call it.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
require_once 'functions/ThumbLib.inc.php';&#60;/p&#62;
&#60;p&#62;$thumb = PhpThumbFactory::create('test.jpg');&#60;/p&#62;
&#60;p&#62;$thumb-&#38;gt;createWatermark('watermark.jpg')-&#38;gt;save('watermarked_image.jpg');&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;The code above just takes the image, applies the watermark and saves it.&#60;/p&#62;
&#60;p&#62;When I run the code above I get &#60;blockquote&#62;Warning: imagecopymerge(): supplied argument is not a valid Image resource in C:\AppServ\www\imagetest\thumb_plugins\gd_watermark.inc.php on line 64&#60;/blockquote&#62;&#60;/p&#62;
&#60;p&#62;However, if I try to resize it before applying the watermark, it works fine. See code below.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
require_once 'functions/ThumbLib.inc.php';&#60;/p&#62;
&#60;p&#62;$thumb = PhpThumbFactory::create('test.jpg');&#60;/p&#62;
&#60;p&#62;$thumb-&#38;gt;resize(600, 600)-&#38;gt;createWatermark('watermark.jpg')-&#38;gt;save('watermarked_image.jpg');&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Environment:&#60;br /&#62;
Windows XP&#60;br /&#62;
Apache 2&#60;br /&#62;
PHP Version 5.2.1&#60;br /&#62;
GD Version 2.0.28&#60;/p&#62;
&#60;p&#62;Do you have any ideas what might be causing that?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Justin&#60;/p&#62;
&#60;p&#62;P.S Awesome script!
&#60;/p&#62;</description>
</item>
<item>
<title>robbrandt on "How does caching work?"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/how-does-caching-work#post-92</link>
<pubDate>Wed, 26 Aug 2009 15:54:57 +0000</pubDate>
<dc:creator>robbrandt</dc:creator>
<guid isPermaLink="false">92@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;It seems that when I update an original file (larger, same location and name) phpthumb continues to display the original file.  I have refreshed my browser, even done &#34;view image&#34; to isolate it from the page and refreshed (which usually works in Firefox) but it's still the original.  Only when I delete the folders inside of phpThumb/cache/ do the new versions show up.&#60;/p&#62;
&#60;p&#62;The configuration options seem to suggest that they should be re-caching if the original has changed.  The cache settings for phpThumb.config.php are:&#60;/p&#62;
&#60;p&#62;// * Cache directory configuration (choose only one of these - leave the other lines commented-out):&#60;br /&#62;
// Note: this directory must be writable (usually chmod 777 is neccesary) for caching to work.&#60;br /&#62;
// If the directory is not writable no error will be generated but caching will be disabled.&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_directory'] = dirname(__FILE__).'/cache/';                            // set the cache directory relative to the phpThumb() installation&#60;br /&#62;
//$PHPTHUMB_CONFIG['cache_directory'] = $PHPTHUMB_CONFIG['document_root'].'/phpthumb/cache/'; // set the cache directory to an absolute directory for all source images&#60;br /&#62;
//$PHPTHUMB_CONFIG['cache_directory'] = './cache/';                                           // set the cache directory relative to the source image - must start with '.' (will not work to cache URL- or database-sourced images, please use an absolute directory name)&#60;br /&#62;
//$PHPTHUMB_CONFIG['cache_directory'] = null;                                                 // disable thumbnail caching (not recommended)&#60;br /&#62;
//if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {&#60;br /&#62;
//	$PHPTHUMB_CONFIG['cache_directory'] = dirname(__FILE__).'/cache/'; // set the cache directory to an absolute directory for all source images&#60;br /&#62;
//} else {&#60;br /&#62;
//	$PHPTHUMB_CONFIG['cache_directory'] = '/tmp/persistent/phpthumb/cache/';&#60;br /&#62;
//}&#60;/p&#62;
&#60;p&#62;$PHPTHUMB_CONFIG['cache_disable_warning'] = true; // If [cache_directory] is non-existant or not writable, and [cache_disable_warning] is false, an error image will be generated warning to either set the cache directory or disable the warning (to avoid people not knowing about the cache)&#60;/p&#62;
&#60;p&#62;$PHPTHUMB_CONFIG['cache_directory_depth'] = 4; // If this larger than zero, cache structure will be broken into a broad directory structure based on cache filename. For example &#34;cache_src012345...&#34; will be stored in &#34;/0/01/012/0123/cache_src012345...&#34; when (cache_directory_depth = 4)&#60;/p&#62;
&#60;p&#62;// * Cache culling: phpThumb can automatically limit the contents of the cache directory&#60;br /&#62;
//   based on last-access date and/or number of files and/or total filesize.&#60;/p&#62;
&#60;p&#62;//$PHPTHUMB_CONFIG['cache_maxage'] = null;            // never delete cached thumbnails based on last-access time&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_maxage'] = 86400 * 30;        // delete cached thumbnails that haven't been accessed in more than [30 days] (value is maximum time since last access in seconds to avoid deletion)&#60;/p&#62;
&#60;p&#62;//$PHPTHUMB_CONFIG['cache_maxsize'] = null;           // never delete cached thumbnails based on byte size of cache directory&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_maxsize'] = 10 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [10MB] of cached files are present (value is maximum bytesize of all cached files)&#60;/p&#62;
&#60;p&#62;//$PHPTHUMB_CONFIG['cache_maxfiles'] = null;          // never delete cached thumbnails based on number of cached files&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_maxfiles'] = 200;             // delete least-recently-accessed cached thumbnails when more than [200] cached files are present (value is maximum number of cached files to keep)&#60;/p&#62;
&#60;p&#62;// * Source image cache configuration&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_source_enabled']   = false;                               // if true, source images obtained via HTTP are cached to $PHPTHUMB_CONFIG['cache_source_directory']&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_source_directory'] = dirname(__FILE__).'/cache/source/';  // set the cache directory for unprocessed source images&#60;/p&#62;
&#60;p&#62;// * cache source modification date configuration&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_source_filemtime_ignore_local']  = false; // if true, local source images will not be checked for modification date and cached image will be used if available, even if source image is changed or removed&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_source_filemtime_ignore_remote'] = true;  // if true, remote source images will not be checked for modification date and cached image will be used if available, even if source image is changed or removed. WARNING: cached performance MUCH slower if this is set to false.&#60;/p&#62;
&#60;p&#62;// * Simplified cache filename configuration&#60;br /&#62;
// Instead of creating unique cache filenames for all parameter combinations, create &#34;simple&#34; cache files (eg: &#34;pic_thumb.jpg&#34;)&#60;br /&#62;
// If cache_default_only_suffix is non-empty, GETstring parameters (except 'src') are ignored and only $PHPTHUMB_DEFAULTS&#60;br /&#62;
// parameters (set at the bottom of phpThumb.config.php) are used for processing.&#60;br /&#62;
// The '*' character MUST be used to represent the source image name&#60;br /&#62;
$PHPTHUMB_CONFIG['cache_default_only_suffix'] = '';           // cached in normal phpThumb manner&#60;br /&#62;
//$PHPTHUMB_CONFIG['cache_default_only_suffix'] = '*_thumb';  // cache 'pic.jpg' becomes 'pic_thumb.jpg' (or 'pic_thumb.png' if PNG output is selected, etc)&#60;br /&#62;
//$PHPTHUMB_CONFIG['cache_default_only_suffix'] = 'small-*';  // cache 'pic.jpg' becomes 'small-pic.jpg' (or 'small-pic.png' if PNG output is selected, etc)&#60;/p&#62;
&#60;p&#62;$PHPTHUMB_CONFIG['cache_prefix'] = 'phpThumb_cache_'.str_replace('www.', '', @$_SERVER['SERVER_NAME']);&#60;br /&#62;
//$PHPTHUMB_CONFIG['cache_prefix'] = 'phpThumb_cache';                         // allow phpThumb to share 1 set of cached files even if accessed under different servername/domains on same server&#60;/p&#62;
&#60;p&#62;$PHPTHUMB_CONFIG['cache_force_passthru'] = true;  // if true, cached image data will always be passed to browser; if false, HTTP redirect will be used instead
&#60;/p&#62;</description>
</item>
<item>
<title>enatom on "How do I do multiple thumbs"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/how-do-i-do-multiple-thumbs#post-81</link>
<pubDate>Mon, 10 Aug 2009 14:58:09 +0000</pubDate>
<dc:creator>enatom</dc:creator>
<guid isPermaLink="false">81@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;How can I make multiple resizes of an uploaded image?&#60;/p&#62;
&#60;p&#62;what is the code like for making the multiple resizes of one uploaded image.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
