|
1. Crop news or event item to display first sentence
|
This code snippet uses the instr function to identify a full stop (period) within a sentence and crops the sentence up to this point. Seems fairly straightforward, but I had a real problem finding any resource out there that offered this!
Hits: 4 Rating: 0.00 Votes: 0
|
| Member Reviews |
 |
Visitor Ratings |
 |
Google PR |
 |
|
|
2. Crop Canvas
|
This is a class allows you to crop an image in a variety of ways. You can crop in an absolute or relative way (to a certain size or by a certain size), both as a pixel number or a percentage. You can also save or display the cropped image. The cropping can be done in 9 different positions: top left, top, top right, left, centre, right, bottom left, bottom, or bottom right. Or you can have it automatically cropped based on a threshold value. The original image can be loaded from the file system or from a string (for example, data returned from a database.) It will also compensate so you can use GD versions 1.x or 2.x (though obviously 2.x will produce much better results!)
Hits: 2 Rating: 0.00 Votes: 0
|
| Member Reviews |
 |
Visitor Ratings |
 |
Google PR |
 |
|
|
|