Home arrow PHP arrow Creating Image Streams from Existing Graphics with the GD Library in PHP

Creating Image Streams from Existing Graphics with the GD Library in PHP

Within the huge range of applications that can be developed with PHP, creating dynamic images may be among the most useful and interesting. This process can be easily tackled by using the GD library. If you're curious about how to use the functions that come bundled with this extension, this series of articles might be what you're looking for.

TABLE OF CONTENTS:
  1. Creating Image Streams from Existing Graphics with the GD Library in PHP
  2. Building image streams from existing GIF graphics
  3. Building an image stream from an existing JPG graphic
  4. Building image streams from an existing PNG graphic
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
August 20, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Welcome to the second installment of the series that began with  "A Close Look at the GD Library in PHP." This series steps you through creating and processing dynamic images with this powerful PHP extension, and it shows you how to use its most relevant functions with numerous practical examples.

Now, reviewing the group of topics discussed in the previous article, hopefully you'll recall that the GD extension can be remarkably useful when it's necessary to generate image streams from scratch. With regard to this process, this extension provides PHP developers with the intuitive "imagecreate()", "imagecreatetruecolor()" and "imagecolorallocate()" functions. When used in conjunction, these functions make building dynamic graphics a truly painless procedure.

The GD library presents some other useful functions as well, like the popular "createimagefromgif()" for building image streams from existing GIF graphics. This function can be quite helpful if your PHP applications demand some kind of preprocessing on certain background images.

So far, so good right? At this stage, hopefully all of the GD functions that I mentioned above should be quite familiar to you, since they're very easy to grasp and use in the context of any PHP application. However, as I stated at the end of the previous article of this series, the GD extension comes packaged with many other useful functions, which indeed deserve a close and detailed look.

Thus, in this second tutorial I'll show you how to create different types of image streams from existing graphics, but in this case limiting the process to building GIF, JPG and PNG images.

Now, having introduced the topics that I plan to discuss, let's continue exploring the functions that come bundled with the GD library. Let's get going!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: