php man page for imagescale

Query: imagescale

OS: php

Section: 3

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

IMAGESCALE(3)								 1							     IMAGESCALE(3)

imagescale - Scale an image using the given new width and height

SYNOPSIS
resource imagescale (resource $image, int $new_width, [int $new_height = -1], [int $mode = IMG_BILINEAR_FIXED])
DESCRIPTION
imagescale(3) scales an image using the given interpolation algorithm.
PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $new_width - The width to scale the image to. o $new_height - The height to scale the image to. If omitted or negative, the aspect ratio will be preserved. Caution You should always provide the height if using PHP 5.5.18 or earlier, or PHP 5.6.2 or earlier, as the aspect ratio calcula- tion was incorrect. o $mode - One of IMG_NEAREST_NEIGHBOUR, IMG_BILINEAR_FIXED, IMG_BICUBIC, IMG_BICUBIC_FIXED or anything else (will use two pass).
RETURN VALUES
Return the scaled image resource on success or FALSE on failure.
CHANGELOG
+-------------+---------------------------------------------------+ | Version | | | | | | | Description | | | | +-------------+---------------------------------------------------+ |5.5.19/5.6.3 | | | | | | | The calculation of the height if $new_height was | | | negative or omitted was fixed; prior to these | | | versions, the aspect ratio was not maintained | | | correctly. | | | | +-------------+---------------------------------------------------+ PHP Documentation Group IMAGESCALE(3)
Related Man Pages
pfspad(1) - debian
pfssize(1) - debian
pfscut(1) - suse
pfspad(1) - suse
imageistruecolor(3) - php
Similar Topics in the Unix Linux Community
16:9 aspect ratio in X windows
Script shell, how to calculate percentage?
Scan Rate
Looking For the Best Way to Rotate an Image: JavaScript, PHP, HTML etc