PHP
  Home arrow PHP arrow Filtering Image Streams with the GD Li...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Filtering Image Streams with the GD Library in PHP
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2007-08-27

    Table of Contents:
  • Filtering Image Streams with the GD Library in PHP
  • Manipulating the colors of an image stream
  • Controlling brightness and contrast with the imagefilter() function
  • More graphic filters with the imagefilter() function

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    The Web Buyer's Guide is your best source for white papers on a wide range of IT products and services. This Week's Featured White Papers: Taming the Threat Landscape by Symantec

    Filtering Image Streams with the GD Library in PHP
    (Page 1 of 4 )

    Building and processing dynamic images with PHP is a procedure that can be easily tackled with the GD extension. If you want to learn how to put its main functions to work for you, then you should start reading this tutorial right now!

    Introduction

    Welcome to the final installment of the series that began with "A Close Look at the GD Library in PHP." Comprised of five articles, this series introduces the most common operations that you can perform with this graphic-processing package. These range from creating basic image streams from scratch to performing more complex operations such as drawing shapes and filtering graphics.

    As usual with many of my articles on web development, before I move on and continue exploring some additional functions integrated with the GD extension, I'd like to refresh the topics treated in the previous article of the series. This will give you a better idea of how the respective functions discussed in that tutorial can be linked with the ones that I plan to cover in the next few sentences.

    Having said that, you'll surely recall that in the preceding article of the series I showed you how to display on the browser some basic filled shapes, including simple rectangles, ellipses and more complex polygons. In addition, I explained how to utilize the handy "imagex()", "imagey()" and "getimagesize()" functions to retrieve the width and height values for a given image stream, as well as determining its MIME type. As you can see, the GD extension has plenty of power when it comes to fetching useful data about a particular graphic, whether that graphic was created dynamically or generated from an existing picture.

    All right, having summarized the concepts that I covered so far, in this article I'm going to demonstrate how the GD library can be used to apply some basic graphic filters (yes, like Photoshop, but much simpler) by utilizing the versatility of a brand new function called "imagefilter()".

    As you'll see shortly, with this function it is possible to reverse, blur and highlight the colors of a determined image, as well as convert it to its grayscale version, among other things. Sounds pretty interesting, right?

    So, are you ready to find out how to apply some basic graphic filters to a given image stream using the GD extension? Okay, let's get started!

    More PHP Articles
    More By Alejandro Gervasio


       · Over the course of this tutorial of the series, the usage of the most important...
     

       

    PHP ARTICLES

    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery
    - Using Timers to Benchmark PHP Applications
    - Benchmarking Applications with PHP
    - Setting Up a Web-Based File Manager: PHPfile...
    - Developing a Modular Class For a PHP File Up...
    - Setting Up a Web-Based File Manager: bfExplo...
    - Defining a Custom Function for File Uploader...
    - Parsing Child Nodes with the DOM XML extensi...
    - Creating an Error Handling Module for a PHP ...
    - Accessing Attributes and Cloning Nodes with ...
    - Retrieving Information on Selected Files wit...
    - Handling HTML Strings and Files with the DOM...
    - Building File Uploaders with PHP 5
    - Working with Multiple Document Nodes with th...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway