This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Resize image - preserve ratio of width and height. | |
| * @param string $sourceImage path to source JPEG image | |
| * @param string $targetImage path to final JPEG image file | |
| * @param int $maxWidth maximum width of final image (value 0 - width is optional) | |
| * @param int $maxHeight maximum height of final image (value 0 - height is optional) | |
| * @param int $quality quality of final image (0-100) | |
| * @return bool | |
| */ | |
| function resizeImage($sourceImage, $targetImage, $maxWidth, $maxHeight, $quality = 80) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Create JPEG image with watermark. | |
| * @param string $sourceImage path to source JPEG image | |
| * @param string $watermark path to watermark in GIF format | |
| * @param string $targetImage path to final JPEG image file | |
| * @param int $transparency watermark transparency (0 transparent - 100 solid) | |
| * @param int $quality quality of final image (0-100) | |
| * @param int offsetX offset of watermark from edge in horizontal direction | |
| * @param int $offsetY offset of watermark from edge in vertical direction | |
| * @param string $alignX alignment of watermark in horizontal direction (left, middle, right) |
NewerOlder