<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 23 May 2012 11:33:08 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Create Instagram Filters With PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17728</guid>
      <link>http://www.phpdeveloper.org/news/17728</link>
      <description><![CDATA[<p>
On NetTuts.com there's a new tutorial showing how you can <a href="http://net.tutsplus.com/tutorials/php/create-instagram-filters-with-php/">create Instagram-like filters</a> in PHP using the <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a> library/extension.
</p>
<blockquote>
PHP comes bundled with <a href="http://www.php.net/manual/en/book.image.php">GD</a> (GIF Draw/Graphics Draw), which is a library for the dynamic creation of images. It can be used for simpler image operation, such as resizing, cropping, adding watermarks, <a href="http://net.tutsplus.com/articles/news/how-to-dynamically-create-thumbnails/">creating thumbnails</a> (Jeffrey wrote about it), applying basic photo filters - you've probably used it before. Unfortunately, if you want to create something more complex with GD, like Instagram effects, you can't. Luckily, though, we have ImageMagick!
</blockquote>
<p>
He starts off by comparing the two graphics libraries and talks briefly about <a href="http://www.imagemagick.org/script/binary-releases.php">how to downliad</a> and install Imagemagick on your development platform. Included is a PHP class to help you use it, coming complete with functions for changing the color tone of the image, adding a border and adding a <a href="http://en.wikipedia.org/wiki/Vignetting">vignette</a> to the image. Also included are some "presets" represented in a few simple functions:
</p>
<ul>
<li>Gotham
<li>Toaster
<li>Nashville
<li>Lomo
<li>Kelvin
</ul>
<p>
There's also a few links to other resources you can use to find out more details on what Imagemagick has to offer.
</p>]]></description>
      <pubDate>Mon, 26 Mar 2012 10:07:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Watermarking Images]]></title>
      <guid>http://www.phpdeveloper.org/news/17332</guid>
      <link>http://www.phpdeveloper.org/news/17332</link>
      <description><![CDATA[<p>
PHPMaster.com has a <a href="http://phpmaster.com/watermarking-images/">recent tutorial</a> showing how to use the built-in <a href="http://php.net/manual/book.imagick.php">Imagick extension</a> to watermark your images effectively. It talks about what makes a good watermark and how to superimpose one on your images with a bit of sample code.
</p>
<blockquote>
Imagine a friend of yours approaches you one day and would like you to build her a website so she can showcase her photography. She wants to be able to <a href="http://phpmaster.com/file-uploads-with-php/">easily upload her photographs</a> and have them watermarked so that people can't easily steal them. "Don't worry!" you tell her, because you know there are functions provided by the <a href="http://php.net/manual/book.imagick.php">Imagick extension</a> that makes watermarking images a breeze in PHP.
</blockquote>
<p>
He talks about things like watermark transparency, the size of it (how much of the image you want it to cover) and the contrast of the watermark image to make it stand out from the image enough to be useful. Their <a href="http://cdn.phpmaster.com/files/2011/10/watermark-image.png">example image</a> and script puts the PHPMaster.com logo over the center of the image and includes a bit of code showing how to scale the watermark image to fit the image (<a href="http://cdn.phpmaster.com/files/2011/10/marked-dog.png">this</a> versus <a href="http://cdn.phpmaster.com/files/2011/10/marked-dog2.png">this</a>.
</p>]]></description>
      <pubDate>Mon, 02 Jan 2012 12:43:44 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Creating a virtual server with Vagrant: a practical walkthrough]]></title>
      <guid>http://www.phpdeveloper.org/news/17145</guid>
      <link>http://www.phpdeveloper.org/news/17145</link>
      <description><![CDATA[<p>
On DZone.com there's a new post from <i>Giorgio Sironi</i> looking at how to <a href="http://css.dzone.com/articles/creating-virtual-server">automate a build of a virtual server with Vagrant</a>, setting up a LAMP-based development instance.
</p>
<blockquote>
Vagrant ia a tool for building virtual machines (in VirtualBox's format) that conforms to a specification. It's written in Ruby, but it makes really no assumptions over the environments that you're gonna build; in this article, we will setup a virtual server for PHP applications running inside Apache.
</blockquote>
<p>
The end result is a virtual machine based on <a href="http://css.dzone.com/articles/using-virtual-machine-play">VirtualBox</a> images and can be built in a few easy steps:
</p>
<ul>
<li>install the vagrant gems on the build system
<li>add a new virtual box instance pointed to a .box file
<li>create the Vagrant config (including the commands to run post-create)
<li>set up a little port forawrding
<li>creating a <a href="http://php.net/phpinfo">phpinfo</a> file and starting up Apache
</ul>
<p>
One suggested place for grabbing images (some with pre-defined software) is <a href="http://bitnami.org/stacks">Bitnami</a>'s "Stacks" repository.
</p>]]></description>
      <pubDate>Fri, 18 Nov 2011 08:18:45 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Martin Psinas' Blog: Watermarking with text and ImageMagick]]></title>
      <guid>http://www.phpdeveloper.org/news/16947</guid>
      <link>http://www.phpdeveloper.org/news/16947</link>
      <description><![CDATA[<p>
<i>Martin Psinas</i> has submitted a new tutorial he's written up (complete with sample code) showing how to <a href="http://psinas.com/index.php?blogid=38">watermark an image with ImageMagick</a>.
</p>
<blockquote>
In my most recent venture with <a href="http://www.phpmaster.com/">PHPMaster</a> I was asked to write an article about watermarking images with PHP using ImageMagick. Virtually no documentation exists on the <a href="http://php.net/imagick">PHP API</a>, although there are plenty of command-line examples from the official <a href="http://www.imagemagick.org/Usage/annotating/#wmark_text">ImageMagick website</a>. I spent a solid day and a half attempting to convert command-line code into PHP before (due to miscommunication) the topic was covered by someone else and my work was no longer needed. Although disappointed, it gave me something to blog about! Yay.
</blockquote>
<p>
His script is pretty straight forward - it loads a sample image, sets up some watermark text and applies it with a "gravity" setting of "southwest" and adds it to the image (annotateImage). The output is pushed back out as a JPEG image. Also included is a slightly more complex example showing how to give the watermark an embossed look and a "text all over the image" look to prevent use of any part of the image, not just one section.
</p>]]></description>
      <pubDate>Tue, 04 Oct 2011 11:44:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Philip Norton's Blog: Creating A Thumbnail Of A Word Document With PHP And LiveDocx]]></title>
      <guid>http://www.phpdeveloper.org/news/16904</guid>
      <link>http://www.phpdeveloper.org/news/16904</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Philip Norton</i> shares a method for <a href="http://www.hashbangcode.com/blog/creating-thumbnail-word-document-php-and-livedocx-598.html">creating a thumbnail of a Word document</a> with the help of PHP and <a href="http://framework.zend.com/manual/en/zend.service.livedocx.html">LiveDocx</a> (in this case, the component inside the Zend Framework).
</p>
<blockquote>
Creating Word document icons is very simple thanks to a service called LiveDocx. LiveDocx was created as a web service to allow the easy creation of most document formats from a simple template. However, it is possible to send a normal Word document as the template file and get an image of the file in return.
</blockquote>
<p>
You'll need a <a href="https://www.livedocx.com/user/account_registration.aspx">LiveDocx account</a> to be able to use the service - there's a <a href="http://www.livedocx.com/pub/pricing.aspx">free</a> option of their service that uses a shared server. Included in the post is a sample script that defines a LiveDocx connection, pulls in a local Word document for parsing and calls a "getBitmaps" method on the service to return the raw image data. This is pushed into an image (using <a href="http://php.net/gd">GD</a>) as a PNG.
</p>]]></description>
      <pubDate>Mon, 26 Sep 2011 08:50:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: From Zero to Cloud: Setting up an EC2 Sandbox, Part 3]]></title>
      <guid>http://www.phpdeveloper.org/news/16891</guid>
      <link>http://www.phpdeveloper.org/news/16891</link>
      <description><![CDATA[<p>
SitePoint's PHPMaster has a new post today, the third part of a series helping you get your application from "zero to cloud" on an Amazon EC2 setup. In <a href="http://phpmaster.com/from-zecro-to-cloud-3/">this latest post</a> they wrap things up by showing how to set up the full lamp stack on the remote server. <a href="http://phpmaster.com/from-zero-to-cloud-1/">Here's part one</a> and <a href="http://phpmaster.com/from-zero-to-cloud-2/">two</a> that lead up to this latest part.
</p>
<blockquote>
This is the final article in a three part series focused on setting up EC2 as a sandbox for application developers. I assume you have an AWS account with Amazon; if you don't, please read Part 1 to learn how easy it is to sign up. I also assume you have configured your development environment and installed an AMI; if you haven't, please read Part 2. In this installment, we'll learn how to install Apache, MySQL and PHP in our running AMI, and then clone the AMI to make our own.
</blockquote>
<p>
Included in the post are all the commands you'll need to get the packages installed for PHP, MySQL, Apache 2, PEAR and the PHP command line binary. With all of that installed, they show you how to create an <a href="http://aws.amazon.com/amis">AMI</a> (Amazon Machine Image) to make it easier to scale in the future. 
</p>]]></description>
      <pubDate>Thu, 22 Sep 2011 08:42:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[.Net Magazine: Create an SVG data visualization with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16853</guid>
      <link>http://www.phpdeveloper.org/news/16853</link>
      <description><![CDATA[<p>
On the .net magazine site (yes, really) there's a recent post from <i>Brian Suda</i> about <a href="http://www.netmagazine.com/tutorials/create-svg-data-visualisation-php">creating SVG images with PHP</a> thanks to the GD functionality that's included in every release.
</p>
<blockquote>
If you're working online, then canvas springs to mind. It allows you to draw raster graphics quickly and easily. If you want, there are also plenty of image code libraries that can generate GIFs, JPEGs and PNGs on request. But what if your target isn't always online? What if you're aiming for print? Then you could use a raster graphic, but it would need to be pretty large. A better solution is to create a vector-based image format from your code. This is where SVG (Scalable Vector Graphics) steps in.
</blockquote>
<p>
He starts by explaining a bit about SVG and what it is for those that haven't worked with it before. He givesn an example of a <a href="http://hint.fm/projects/wired2008/">poster from Wired</a> showing circles with colors from their covers over the last 15 years. He shows how to do something similar with images of the .net magazine covers, pulling out the color frequency with the <a href="http://php.net/imagecolorat">imagecolorat</a> function. Toss in a bit of markup and some formatting of the color output and you'll get circles with concentric rings with the most prominent colors ending up the largest. You can <a href="http://media.netmagazine.com/files/images/2011/08/5.gif">see his result here</a>.
</p>]]></description>
      <pubDate>Tue, 13 Sep 2011 12:13:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: Watermark processing on images using PHP and GD]]></title>
      <guid>http://www.phpdeveloper.org/news/16840</guid>
      <link>http://www.phpdeveloper.org/news/16840</link>
      <description><![CDATA[<p>
On the Script-Tutorials blog today there's a new tutorial posted showing you how to <a href="http://www.script-tutorials.com/watermark-processing-on-images-using-php-and-gd/">easily add watermarks to your images</a> dynamically, either as a part of a cache generation or on upload.
</p>
<blockquote>
I will show you how to use GD library. And, main task today is adding watermark to image and generate result as PNG image into browser. We will using PHP and GD library. This is nice library to work with images at server side. Also (as additional tasks) I will draw little frame over image and will draw some text. Between, you can use this method (of adding watermarks in realtime) to protect original photos.
</blockquote>
<p>
Full code for the script is included in the post, showing the combining of two images into the one finished product. The code is also <a href="http://www.script-tutorials.com/demos/137/source.zip">available for download</a> if you'd like to get hacking right away.
</p>]]></description>
      <pubDate>Fri, 09 Sep 2011 12:36:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Philip Norton's Blog: Desaturate Images With PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16828</guid>
      <link>http://www.phpdeveloper.org/news/16828</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Philip Norton</i> shows how to <a href="http://www.hashbangcode.com/blog/desaturate-images-php-593.html">desturate images with PHP</a> using the already built-in <a href="http://php.net/gd">GD libraries</a> and the <a href="http://php.net/imagecopymergegray">imagecopymergegray</a> function.
</p>
<blockquote>
To desaturate an image means to remove all non-greyscale colours from it, essentially creating a black and white version. To do this you can use the function imagecopymergegray(), which is part of the GD image library. This function is a little difficult to figure out, but what is does is sample one image into another and optionally changing the amount of colours that are kept during the sampling process. The function can be made to sample just a section of the image, or the whole thing. 
</blockquote>
<p>
He also offers an alternative method that uses <a href="http://php.net/imagefilter">imagefilter</a> instead, passing it the IMG_FILTER_GRAYSCALE flag. Included is a full block of code for a method he recently included in a WordPress site to dynamically create thumbnails.
</p>]]></description>
      <pubDate>Wed, 07 Sep 2011 12:51:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[James Morris' Blog: How to Strip EXIF Data Using Imagick]]></title>
      <guid>http://www.phpdeveloper.org/news/16771</guid>
      <link>http://www.phpdeveloper.org/news/16771</link>
      <description><![CDATA[<p>
<i>James Morris</i> has a quick tutorial today showing how to <a href="http://blog.jmoz.co.uk/imagick-strip-exif-data">pull the exif data from a photo</a> and make it into something useful you can either display on on the site or store for categorization.
</p>
<blockquote>
Today I spent a good amount of time trying to figure out how to strip exif data from an image using Imagick. The first port of call was the (pathetic) <a href="http://php.net/manual/en/book.imagick.php">documentation</a> at php.net.  I searched for 'exif' but found nothing. [...] I was tipped off by a colleague to the method Imagick::stripImage() which apparently did what I wanted.  The only mention of exif is in a rather helpful comment at the bottom of the page.
</blockquote>
<p>
This comment pointed him to the Imagick::stripImage() function that pulls off the data and returns exif information (or, as the documentation calls it, "profiles and comments"). His seven line script is included in the post that initializes the Imagick object, pulls in the file and runs the stripImage() method with the option for "exif:*". The resulting properties are then displayed including aperature value, date taken, exposure time, make and model of the camera, shutter speed, resolution and much more.
</p>]]></description>
      <pubDate>Thu, 25 Aug 2011 10:42:33 -0500</pubDate>
    </item>
  </channel>
</rss>

