Function __global->cms_imagecreatefrom
Definitions
sources/images.php
- Load a GD image resource from a path.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | Path to load from |
| $ext | ?string | No | No | Null | N/A | N/A | File extension (null: get from path, even if not detected this function will mostly work) |
Returns
- Image resource (false: error)
- Type: ~resource
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Load a GD image resource from a path.
*
* @param PATH $path Path to load from
* @param ?string $ext File extension (null: get from path, even if not detected this function will mostly work)
* @return ~resource Image resource (false: error)
*/
function cms_imagecreatefrom(string $path, ?string $ext = null)
* Load a GD image resource from a path.
*
* @param PATH $path Path to load from
* @param ?string $ext File extension (null: get from path, even if not detected this function will mostly work)
* @return ~resource Image resource (false: error)
*/
function cms_imagecreatefrom(string $path, ?string $ext = null)

