GD
Less than 1 minute
GD
- Full name:
\Hazaar\File\Renderer\GD
- Parent class:
\Hazaar\File\Renderer\BaseRenderer
Properties
img
private ?\GdImage $img
type
private string $type
quality
private ?int $quality
Methods
__construct
public __construct(?int $quality = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$quality | ?int |
load
public load(string $bytes, ?string $type = null): int
Parameters:
Parameter | Type | Description |
---|---|---|
$bytes | string | |
$type | ?string |
read
public read(): false|string
quality
public quality(?int $quality = null): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$quality | ?int |
width
public width(): int
height
public height(): int
compress
public compress(int $quality): void
Parameters:
Parameter | Type | Description |
---|---|---|
$quality | int |
resize
public resize(?int $width = null, ?int $height = null, bool $crop = false, ?string $align = null, bool $keep_aspect = true, bool $reduce_only = true, ?float $ratio = null, int $offsetTop, int $offsetLeft): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$width | ?int | |
$height | ?int | |
$crop | bool | |
$align | ?string | |
$keep_aspect | bool | |
$reduce_only | bool | |
$ratio | ?float | |
$offsetTop | int | |
$offsetLeft | int |
expand
public expand(?int $xwidth = null, ?int $xheight = null, string $align = 'topleft', int $offsetTop, int $offsetLeft): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$xwidth | ?int | |
$xheight | ?int | |
$align | string | |
$offsetTop | int | |
$offsetLeft | int |
filter
public filter(string[]|string $filter_def): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$filter_def | string[]|string |
Inherited methods
loaded
public loaded(): bool
Automatically generated on 2024-11-14