![]() |
The Big GD Guide - Part 2
I have posted this guide here as it uses images and for some reason the article system seems to be very limited when it comes to a editor like the forum one :-D
Part 2 Here finally is my GD guide part 2 sorry to anyone who has been waiting for it. If you have not yet read the first one i would suggest you do. Image size Now you can use GD to create a thumbnail or a smaller version of a image, but of course you don't want to have to guess image sizes or always change things. We can get the image size PHP Code:
PHP Code:
With the GD library you are able to copy from one image and place onto another image using the imagecopy(); function. PHP Code:
Properties PHP Code:
Lines & Shapes We can create lines and other shapes in PHP. This allows us to create many nice looking effects like creating graphs or adding additional graphics to images dynamically. The Lines PHP Code:
PHP Code:
![]() Results ![]() The Rectangles You are able to create nice looking rectangles, but they can also look like squares. PHP Code:
PHP Code:
![]() Result ![]() They are some of the basic of shapes and the easiest. Next we shall be talking about Circles in the next chapter Part 3 |
Quote:
Nice guide btw, looking forward to Part 3 :-) Alan |
Yeah part three I'm looking for.
|
Jeeeeesus...
You really do plan this stuff out well, man. I really like this series of guides. However, I have a few requests for the next couple of guides: 1) Explain the relation between coordinates and pixels, please O.o 2) If we use header(Content-type:image/png), how can GD be useful in lets say, a gallery, if it doesn't output more than an image? 3) Can you do a side-by-side of GD and the other image thing... Imagick? |
| All times are GMT. The time now is 02:34 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0