Generating thumbnails – resizing
Obviously having the functionality to generate thumbnails is a useful thing to do. Most web developers have had the requirement to create thumbnails of images they are currently uploading, or images previously uploaded, from time to time. Usually that processing would have been done directly with PHP or whichever programming language you may have been using; but CodeIgniter gives you the ability to create thumbnails easily, and this is how you do it.
We're going to use a library of our own for this. If you haven't already done so (in the other recipes in this chapter), create the following file:
- Ensure that the
Image_maniplibrary class is defined ...