![]() In edge detection, for example, a sharp change in color implies that we have reached the edge of some object in the image. Effects like blurring or edge detection are calculated for each pixel depending on that pixel's value and the values of the surrounding pixels. Manipulating Images Using a Convolution MatrixĮxcept for the pixels at the edges, every pixel in an image is surrounded by eight other pixels. In this tutorial, we will learn about many more useful functions in GD and how they can be used to automate more of our image manipulation tasks. If you have never used the PHP GD library before, I would suggest that you go through that GD introductory article before reading this one. Embedding Watermarks or Other Information in Imagesīy the end of my last GD tutorial, you learned how to use the library to automate basic tasks like resizing all images in a directory or applying filters like grayscale on them before saving the final result.Manipulating Images Using a Convolution Matrix.I also mentioned some useful functions in GD like imagesx() and imagesy() to get the width and height of the loaded image. ![]() I covered the imagefilter() function to apply different filters to image resources loaded in the script. After that, we learned how to crop, rotate, scale, and flip an image using GD. In that tutorial, I gave a brief introduction to the library and showed you how to load images from a file or create them from scratch in PHP. In my previous tutorial, we discussed basic image manipulation using the PHP GD library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |