LibGd 2.4.0-dev
GD Graphics library
Loading...
Searching...
No Matches
Data Fields
gdScaleOptions Struct Reference

#include <gd.h>

Data Fields

gdScaleFit fit
 
gdScaleGravity gravity
 
gdScaleStrategy strategy
 
int background_color
 
int interpolation
 

Detailed Description

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.

Field Documentation

◆ background_color

int gdScaleOptions::background_color

Truecolor ARGB background used for padding and palette transparency.

◆ fit

gdScaleFit gdScaleOptions::fit

Aspect-ratio behavior.

◆ gravity

gdScaleGravity gdScaleOptions::gravity

Crop or padding anchor.

◆ interpolation

int gdScaleOptions::interpolation

Interpolation method, or GD_SCALE_INTERPOLATION_AUTO.

◆ strategy

gdScaleStrategy gdScaleOptions::strategy

Optional cover-crop strategy.


The documentation for this struct was generated from the following file: