|
| __construct (private string string $imagepath,) |
| Constructor for the image processing class.
|
|
| add_watermark (string $watermark='', array $options=[], array $pos=[10, 10],) |
| Add watermark to image.
|
|
| save (string $newpath='') |
| Save image.
|
|
◆ __construct()
core_ai\ai_image::__construct |
( |
private string string | $imagepath | ) |
|
Constructor for the image processing class.
Initializes the class with the provided image path, setting up the image object and its properties. The constructor checks if the GD library functions for PNG and JPEG are available, ensures the image file exists and is readable, and then creates an image resource object based on the file type (JPEG, PNG, or GIF).
- Parameters
-
string | $imagepath | The path to the image file. |
- Parameters
-
◆ add_watermark()
core_ai\ai_image::add_watermark |
( |
string | $watermark = '', |
|
|
array | $options = [], |
|
|
array | $pos = [10, 10] ) |
Add watermark to image.
- Parameters
-
string | $watermark | Watermark text. |
array | $options | Watermark options. |
array | $pos | Watermark position. |
- Return values
-
◆ save()
core_ai\ai_image::save |
( |
string | $newpath = '' | ) |
|
Save image.
- Parameters
-
string | $newpath | New path to save image. |
- Return values
-
bool | Whether the save was successful |
The documentation for this class was generated from the following file: