Posts

Showing posts from November, 2022

How to Create Image Thumbnails

Image
  How to Create Image Thumbnails Image thumbnails are basically a smaller size copy of a larger image. They can be created using PHP GD Library functions alongside a file system function that we already learned about. The getimagesize() file function will return the dimensions of the image specified. It can be used together with the list() function to minimize code and effort. The imagecopyresampled() function can be used to stick a smaller version of an existing image into a new (smaller) image, thus creating a thumbnail. The syntax is: imagecopyresampled(resource $dst_image, resource $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h)  dst_image = Destination Image  src_image = Source Image  dst_x = X Coordinate of Destination Image  dst_y = Y Coordinate of Destination Image  src_x = X Coordinate of Source Image  src_y = Y Coordinate of Source Image  dst_w = Destination Width ...

html

  Web pages are files that are viewed using a browser. They are written in a language called HTML. HTML is made up of a set of elements, or tags, that are used as instructions to tell the browser what should appear on a web page, and how it should be structured. An HTML element looks something like this: <html> </html> Anyone can view a webpage's HTML by viewing the source of that webpage. If you right click on this page, for example, and select "View Page Source", you can see the HTML that the browser is interpreting in order to display the page that you see. Although HTML is a single language maintained by a single organization, there are many different browsers available, created and maintained by many different organizations. Firefox, Chrome, Opera, Safari, and Internet Explorer are all commonly used browsers. Each browser may render HTML code a little differently, so it is always best to view your HTML files in multiple browsers to check their app...