WebP
in package
WebP file information class.
Tags
Table of Contents
Properties
- $file : string|null
Methods
- __construct() : mixed
- WebP file information class.
- checkWebPConstant() : mixed
- Check that WEBP constants are already define, if not then define it.
- isAnimated() : bool
- Check if WEBP file that was specified is animated or not.
- isGDSupported() : bool
- Check if GD supported current WEBP file.
- isImagickSupportedAnimated() : bool
- Check if Imagick (and ImageMagick) supported animated WEBP.
- webPInfo() : array<string|int, mixed>|false
- Get WebP file info.
Properties
$file
protected
string|null
$file
File path.
Tags
Methods
__construct()
WebP file information class.
public
__construct([string $file = '' ]) : mixed
Parameters
- $file : string = ''
-
Path to WEBP file.
Tags
checkWebPConstant()
Check that WEBP constants are already define, if not then define it.
public
checkWebPConstant() : mixed
isAnimated()
Check if WEBP file that was specified is animated or not.
public
isAnimated() : bool
Tags
Return values
bool —Return true if yes, false if something else.
isGDSupported()
Check if GD supported current WEBP file.
public
isGDSupported() : bool
Tags
Return values
bool —Return true if yes, false if no.
isImagickSupportedAnimated()
Check if Imagick (and ImageMagick) supported animated WEBP.
public
isImagickSupportedAnimated() : bool
This test is not depend on WEBP file specified.
Tags
Return values
bool —Return true if it is already supported. Return false for otherwise.
webPInfo()
Get WebP file info.
public
webPInfo([string $file = '' ]) : array<string|int, mixed>|false
Parameters
- $file : string = ''
-
Full path to image file. You can omit this argument and use one in class constructor instead.
Tags
Return values
array<string|int, mixed>|false —Return associative array if success, return false for otherwise.