PHP-Fusion Development

createsquarethumbnail()

Create a square thumbnail from an already uploaded image.

Versions: 9

createsquarethumbnail( int $filetype, string $origfile, string $thumbfile, int $new_size ) : void

Parameters

$filetype (int) (Required) Possible value: 1 - .gif, 2 - .jpg, 3 - .png, 4 - .webp

$origfile (string) (Required) The full path to the original file from which you want to create a thumbnail.

$thumbfile (string) (Required) The full path to the thumbnail file you want to create.

$new_size (int) (Required) Maximum size for thumbnail image.

Return Values

(void)

Examples

require_once INCLUDES.'photo_functions_include.php';
‚Äč
$origfile = IMAGES.'php-fusion-icon.png';
$thumbfile = IMAGES.'php-fusion-icon_thumb.png';
createsquarethumbnail(3, $origfile, $thumbfile, 100);