<?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, 19 Jun 2013 06:22:23 -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[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[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[Mikko Koppanen's Blog: Perspective transformations]]></title>
      <guid>http://www.phpdeveloper.org/news/11888</guid>
      <link>http://www.phpdeveloper.org/news/11888</link>
      <description><![CDATA[<p>
<i>Mikko Koppanen</i> is back to blogging with <a href="http://valokuva.org/?p=112">this new post</a> today - it's a look at another example with <a href="http://imagemagick.org">ImageMagick</i>. It shows how to <a href="http://imagemagick.org/Usage/distorts/#perspective">distort an image</a> but keep its perspective.
</p>
<blockquote>
I took some time to actually understand the perspective transformations properly using the excellent ImageMagick examples (mainly created by Anthony Thyssen) as a reference. The basic idea of perspective distortion seems simple: to distort the control points to new locations.
</blockquote>
<p>
His example uses a checkerboard as the image to manipulate and, based on an array of settings (source, destination) sets control points for the image to twist and turn from. The final output is echoed from a call to distortImage.
</p>]]></description>
      <pubDate>Thu, 05 Feb 2009 09:36:02 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[The Bakery: Five New Articles/Tutorials/Components Posted]]></title>
      <guid>http://www.phpdeveloper.org/news/10360</guid>
      <link>http://www.phpdeveloper.org/news/10360</link>
      <description><![CDATA[<p>
The Bakery, the CakePHP repository, has had several new components, articles and tutorials posted lately. Here's a list of a few:
</p>
<ul>
<li><a href="http://bakery.cakephp.org/articles/view/mysql-collation-behavior">MySQL collation behavior</a>
<li><a href="http://bakery.cakephp.org/articles/view/image-magick-convert-resizing-helper-with-cache">Image Magick Resize Helper</a>
<li><a href="http://bakery.cakephp.org/articles/view/tidy-output-filtering">Tidy Output Filtering</a>
<li><a href="http://bakery.cakephp.org/articles/view/setting-svn-ignore-properties">Setting SVN Ignore properties</a>
<li><a href="http://bakery.cakephp.org/articles/view/release-pure-cake-power-in-rc1">Release: Pure Cake Power in RC1</a>
</ul>
<p>
Be sure to check out <a href="http://bakery.cakephp.org">The Bakery</a> for more great articles, tutorial, components and helpers for this flexible framework.
</p>]]></description>
      <pubDate>Fri, 06 Jun 2008 12:07:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mikko Koppanen's Blog: Seam carving]]></title>
      <guid>http://www.phpdeveloper.org/news/9627</guid>
      <link>http://www.phpdeveloper.org/news/9627</link>
      <description><![CDATA[<p>
<i>Mikko Koppanen</i> has posted <a href="http://valokuva.org/?p=99">another quick hit</a> ImageMagick hint to his blog - this time it deal with "seam carving", a process for cropping and resampling of an image to make a different composite picture.
</p>
<blockquote>
Today I was reading trough the ImageMagick ChangeLog and noticed an interesting entry. "Add support for liquid rescaling". I rushed to check the MagickWand API docs and there it was: MagickLiquidRescaleImage! After about ten minutes of hacking the Imagick support was done. Needless to say; I was excited
</blockquote>
<p>
You'll need to have the <a href="http://liblqr.wikidot.com/">libqr library</a> compiled into the ImageMagick installation, but the actual use of the functionality is simple - about three or four lines do the work for you. He includes <a href="http://valokuva.org/wp-content/uploads/2008/02/landscape_orig.jpg">the original image</a> and <a href="http://valokuva.org/wp-content/uploads/2008/02/landscape.jpg">the result</a> from his test (as well as <a href="http://valokuva.org/wp-content/uploads/2008/02/300x300_result.jpg">another example</a> of the same result image scaled down automatically.
</p>]]></description>
      <pubDate>Wed, 13 Feb 2008 17:10:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mikko Koppanen's Blog: Typesetting]]></title>
      <guid>http://www.phpdeveloper.org/news/9440</guid>
      <link>http://www.phpdeveloper.org/news/9440</link>
      <description><![CDATA[<p>
<i>Mikko Koppanen</i> has posted <a href="http://valokuva.org/?p=93">another quick example</a> of using the ImageMagick functionality in PHP - overlaying a string of text over a currently existing image.
</p>
<blockquote>
Ever had the situation where you have a piece of string which you need to overlay on an image? Maybe a situation where the area reserved for the string is known in pixels but you need to know the font size to fill most of the area? Think no more!
</blockquote>
<p>
In <a href="http://valokuva.org/?p=93">his example</a> (ready to cut and paste), he defines the text in a variable and, with the help of the newPseudoImage method, adds the text over the top of his sample image. Example input and output is provided.
</p>]]></description>
      <pubDate>Thu, 17 Jan 2008 07:58:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint.com: Create Dynamic Images with ImageMagick]]></title>
      <guid>http://www.phpdeveloper.org/news/5685</guid>
      <link>http://www.phpdeveloper.org/news/5685</link>
      <description><![CDATA[<p>
Over on SitePoint.com today, there's <a href="http://www.sitepoint.com/article/dynamic-images-imagemagick">a new tutorial</a> demonstrating an alternative to the usual GD library examples of working with images, opting instead for ImageMagick.
</p>
<blockquote>
The key component for making dynamic images a reality on your site is an image manipulation program that's controlled by the code that generates your web pages. Even though this article uses PHP as the scripting language, other languages -- such as Perl and Ruby -- can be used just as easily, provided that the image manipulation program that you're considering has an application programming interface (API) for the chosen language.
</blockquote>
<p>
He <a href="http://www.sitepoint.com/article/dynamic-images-imagemagick">decided on</a> ImageMagick for a few reasons, including that it's more supported by web hosts, it runs on Windows and Linux, and it's robust and powerful enough to handle everything from small to large tasks without missing a beat.
</p>
<p>
That said, he gets into the code, showing how a bit of PHP code can read in an image and spit back out information about it (height, width, etc), force a reduction of an uploaded image, scale down an image to fit a certian size, change it to a different type of image, and image rotation.
</p>]]></description>
      <pubDate>Mon, 26 Jun 2006 06:48:53 -0500</pubDate>
    </item>
  </channel>
</rss>
