Page 288 - Open Soource Technologies 304.indd
P. 288
Web Technologies-I
Notes image.gif: It is the name of the image. Notice it is following the same type of format as your
HTML documents. There is a name (image) then a dot and then there is a suffix (gif).
Image: An image is a rectangle of pixels that have various colours. Colours are identified by
their position in the palette, an array of colours.
IMG: It stands for “image.” It announces to the browser that an image will go here on the page.
Yes, the image will pop up right where you write in the image tag.
SRC: It stands for “source.” This again is an attribute, a command inside a command. It is telling
the browser where to go to find the image. Again, it is best for you to place the images you
want to use in a subdirectory called “images”.
WIDTH: It stands for just that, the width of the image in pixels. It can range from 1 pixel to,
well, just about any number, but generally will be less than the width of the web browser.
1. Develop a PHP program to converting an image into text.
2. Develop a PHP program to rotating an image by 60° angle.
11.11 Review Questions
1. What is the meaning of Graphics? How it is used with PHP? Explain with example.
2. How an image embedding in a page with PHP?
3. How an Image converts into a Link? Explain with example.
4. Why we use GD library? Explain the GD extensions with example.
5. What are the basic concepts of graphics? Explain briefly.
6. What is the process to create and draw the images with graphics?
7. How the images embedded with text? Explain with example.
8. How we create dynamic buttons in Graphics? Explain with example.
9. What is the meaning of scaling of image? How does it perform in Graphics? Explain with
example.
10. How the colour handlings proceed in graphics? Write a program to create a red rectangle
on white background.
Answers to Self Assessment
1. (d) 2. (c) 3. (c) 4. (a) 5. (d)
6. (b) 7. (a) 8. (b) 9. ImageAllocateColor( )
10. two 11. pixels
11.12 Further Readings
Learning PHP 5, by David Sklar.
Beginning PHP 5.3, by Matt Doyle.
http://php.about.com/od/gdlibrary/p/php_graphics.htm
282 LOVELY PROFESSIONAL UNIVERSITY