<?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>Thu, 23 May 2013 17:31:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Crop and Resize Images with ImageMagick]]></title>
      <guid>http://www.phpdeveloper.org/news/19537</guid>
      <link>http://www.phpdeveloper.org/news/19537</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial posted showing you how to <a href="http://phpmaster.com/crop-and-resize-images-with-imagemagick/">crop and resize images</a> with the help of the ImageMagick functionality that can be added to PHP (via <a href="http://pecl.php.net/package/imagick">this extension</a>).
</p>
<blockquote>
If your website allows users to upload photos, image cropping/resizing functionality certainly comes in handy. But users might not have access to image manipulation tools like Photoshop, so by providing a cropping/resizing feature you can allow users to upload photos from any device (e.g. tablets or phones) without them having to worry about the the final size. Furthermore, you can create different versions of the same image and also allow users to crop specific portions of uploaded picture. In this article I'll show you how to create an image cropping tool with the help of the ImageMagick PHP extension. 
</blockquote>
<p>
The post shows the use of the "cropimage" function to trim down an image from its original size and "thumbnailImage" to shrink down the image to make a thumbnail. Also included is the code (both the PHP and the HTML form) to handle file uploads and automatically create a thumbnail image. It outputs the image to the browser and asks the user to select the portion they want thumbnailed (with <a href="http://odyniec.net/projects/imgareaselect/">this jQuery plugin</a> helping). 
</p>
Link: http://phpmaster.com/crop-and-resize-images-with-imagemagick]]></description>
      <pubDate>Thu, 02 May 2013 12:14:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Phil Sturgeon: Package Watch: Image Management]]></title>
      <guid>http://www.phpdeveloper.org/news/18495</guid>
      <link>http://www.phpdeveloper.org/news/18495</link>
      <description><![CDATA[<p>
<i>Phil Sturgeon</i> has a new post to his site talking about how he <a href="http://philsturgeon.co.uk/blog/2012/09/package-watch-image-management">added image upload and management support</a> to an application with an easy integration of two packages (pulled in via Composer).
</p>
<blockquote>
To get this extra functionality I added two packages to my composer.json. [...] The first is <a href="https://github.com/codeguy/Upload">Upload</a> by <a href="https://www.joshlockhart.com/">Josh Lockhart</a> (who built Slim and started <a href="http://www.phptherightway.com/">PHP The Right Way</a>). It's currently very basic as it's not been alive long, but for the job I needed to do it worked perfect.
</blockquote>
<p>
The second package is the <a href="https://github.com/Sybio/ImageWorkshop">ImageWorkshop</a> that let him easily resize the uploaded images and add a watermark to the corner. He also points out that this method of pulling together packages, each with their own specializations, is the "early days of a PHP renaissance" in how people will work with the language.
</p>]]></description>
      <pubDate>Wed, 19 Sep 2012 12:32:14 -0500</pubDate>
    </item>
    <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[Script-Tutorials.com: Creating a Smooth Curve Graphs with PHP and GD]]></title>
      <guid>http://www.phpdeveloper.org/news/17038</guid>
      <link>http://www.phpdeveloper.org/news/17038</link>
      <description><![CDATA[<p>
On Script-Tutorials.com there's a new tutorial posted showing you how you can <a href="http://www.script-tutorials.com/smooth-curve-graphs-with-php-and-gd/">get better curves on your graphs</a> with PHP and GD (the key is in the "CubicSplines" class, providing a few extra calculations to make "splines", a mathematical method for <a href="http://en.wikipedia.org/wiki/Spline_(mathematics)">smoothing out values</a>).
</p>
<blockquote>
Today I have new article for PHP. I will tell you about drawing graphs with GD. Plus - we will smooth our graph with curve lines using cubic splines interpolation method. You can read more about method at <a href="http://en.wikipedia.org/wiki/Cubic_splines">Wikipedia</a>.
</blockquote>
<p>
All of the code is included in the post, ready for cop and pasting - the HTML, CSS plus the PHP to generate the graph, plot the points and apply the cubic splines values. You can check out a <a href="http://www.script-tutorials.com/demos/169/index.html">live demo</a> of it in action or just <a href="http://www.script-tutorials.com/demos/169/source.zip">download the code</a> and get started on your own.
</p>]]></description>
      <pubDate>Tue, 25 Oct 2011 11:27:51 -0500</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>
  </channel>
</rss>
