|
LibGd 2.4.0-dev
GD Graphics library
|
#include <gd.h>
Data Fields | |
| gdScaleFit | fit |
| gdScaleGravity | gravity |
| gdScaleStrategy | strategy |
| int | background_color |
| int | interpolation |
Struct: gdScaleOptions
Options for gdImageScaleWithOptions.
Members: fit - Aspect-ratio behavior. See gdScaleFit. gravity - Crop or padding anchor. See gdScaleGravity. strategy - Optional cover-crop strategy. See gdScaleStrategy. background_color - Truecolor ARGB background used for padding and for transparent palette pixels. interpolation - A gdInterpolationMethod value (see gdImageSetInterpolationMethod), or GD_SCALE_INTERPOLATION_AUTO.
Defaults: If the options pointer passed to gdImageScaleWithOptions is NULL, gd uses GD_SCALE_FIT_COVER, GD_SCALE_GRAVITY_CENTER, GD_SCALE_STRATEGY_NONE, background color 0x7f000000 and GD_SCALE_INTERPOLATION_AUTO.
Notes: For palette sources, gd prepares a truecolor working copy. Transparent pixels are replaced with background_color before scaling; if background_color is a valid palette index, that palette entry is converted to truecolor.
| int gdScaleOptions::background_color |
Truecolor ARGB background used for padding and palette transparency.
| gdScaleFit gdScaleOptions::fit |
Aspect-ratio behavior.
| gdScaleGravity gdScaleOptions::gravity |
Crop or padding anchor.
| int gdScaleOptions::interpolation |
Interpolation method, or GD_SCALE_INTERPOLATION_AUTO.
| gdScaleStrategy gdScaleOptions::strategy |
Optional cover-crop strategy.