php man page for imagewebp

Query: imagewebp

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

IMAGEWEBP(3)								 1							      IMAGEWEBP(3)

imagewebp - Output an WebP image to browser or file

SYNOPSIS
bool imagewebp (resource $image, string $filename)
DESCRIPTION
Outputs or save an WebP version of the given $image.
PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $filename -The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 Saving an WebP file <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'WebP with PHP', $text_color); // Save the image imagewebp($im, 'php.webp'); // Free up memory imagedestroy($im); ?> PHP Documentation Group IMAGEWEBP(3)
Related Man Pages
imagejpeg(3) - php
imagecreatetruecolor(3) - php
imagexbm(3) - php
imagefilledrectangle(3) - php
imageistruecolor(3) - php
Similar Topics in the Unix Linux Community
Simple rules of the UNIX.COM forums:
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1)
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
Please Welcome Nicki Paul to the Moderator Team!