php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "gd.h"
#include "gdhelpers.h"
#include "gd_intern.h"
Go to the source code of this file.
Data Structures | |
struct | ContributionType |
struct | LineContribType |
Typedefs | |
typedef long | gdFixed |
typedef enum GD_RESIZE_FILTER_TYPE | gdResizeFilterType |
Enumerations | |
enum | GD_RESIZE_FILTER_TYPE { FILTER_DEFAULT = 0 , FILTER_BELL , FILTER_BESSEL , FILTER_BLACKMAN , FILTER_BOX , FILTER_BSPLINE , FILTER_CATMULLROM , FILTER_COSINE , FILTER_CUBICCONVOLUTION , FILTER_CUBICSPLINE , FILTER_HERMITE , FILTER_LANCZOS3 , FILTER_LANCZOS8 , FILTER_MITCHELL , FILTER_QUADRATIC , FILTER_QUADRATICBSPLINE , FILTER_TRIANGLE , FILTER_GAUSSIAN , FILTER_HANNING , FILTER_HAMMING , FILTER_SINC , FILTER_WELSH , FILTER_CALLBACK = 999 } |
Functions | |
int | getPixelInterpolated (gdImagePtr im, const double x, const double y, const int bgColor) |
gdImagePtr | gdImageScaleTwoPass (const gdImagePtr src, const unsigned int src_width, const unsigned int src_height, const unsigned int new_width, const unsigned int new_height) |
gdImagePtr | gdImageScaleNearestNeighbour (gdImagePtr im, const unsigned int width, const unsigned int height) |
gdImagePtr | gdImageScaleBilinear (gdImagePtr im, const unsigned int new_width, const unsigned int new_height) |
gdImagePtr | gdImageScaleBicubicFixed (gdImagePtr src, const unsigned int width, const unsigned int height) |
gdImagePtr | gdImageScale (const gdImagePtr src, const unsigned int new_width, const unsigned int new_height) |
gdImagePtr | gdImageRotateNearestNeighbour (gdImagePtr src, const float degrees, const int bgColor) |
gdImagePtr | gdImageRotateGeneric (gdImagePtr src, const float degrees, const int bgColor) |
gdImagePtr | gdImageRotateBilinear (gdImagePtr src, const float degrees, const int bgColor) |
gdImagePtr | gdImageRotateBicubicFixed (gdImagePtr src, const float degrees, const int bgColor) |
gdImagePtr | gdImageRotateInterpolated (const gdImagePtr src, const float angle, int bgcolor) |
void | gdDumpRect (const char *msg, gdRectPtr r) |
int | gdTransformAffineGetImage (gdImagePtr *dst, const gdImagePtr src, gdRectPtr src_area, const double affine[6]) |
int | gdTransformAffineCopy (gdImagePtr dst, int dst_x, int dst_y, const gdImagePtr src, gdRectPtr src_region, const double affine[6]) |
int | gdTransformAffineBoundingBox (gdRectPtr src, const double affine[6], gdRectPtr bbox) |
int | gdImageSetInterpolationMethod (gdImagePtr im, gdInterpolationMethod id) |
gdInterpolationMethod | gdImageGetInterpolationMethod (gdImagePtr im) |
#define colorIndex2RGBA | ( | c | ) |
Definition at line 663 of file gd_interpolation.c.
Definition at line 664 of file gd_interpolation.c.
#define DEFAULT_BELL_RADIUS 1.5 |
Definition at line 129 of file gd_interpolation.c.
#define DEFAULT_BOX_RADIUS 0.5 |
Definition at line 127 of file gd_interpolation.c.
#define DEFAULT_CATMULLROM_RADIUS 2.0 |
Definition at line 133 of file gd_interpolation.c.
#define DEFAULT_COSINE_RADIUS 1.0 |
Definition at line 132 of file gd_interpolation.c.
#define DEFAULT_CUBICCONVOLUTION_RADIUS 3.0 |
Definition at line 136 of file gd_interpolation.c.
#define DEFAULT_CUBICSPLINE_RADIUS 2.0 |
Definition at line 130 of file gd_interpolation.c.
#define DEFAULT_FILTER_BICUBIC 3.0 |
Definition at line 120 of file gd_interpolation.c.
#define DEFAULT_FILTER_BOX 0.5 |
Definition at line 121 of file gd_interpolation.c.
#define DEFAULT_FILTER_GENERALIZED_CUBIC 0.5 |
Definition at line 122 of file gd_interpolation.c.
#define DEFAULT_FILTER_RADIUS 1.0 |
Definition at line 123 of file gd_interpolation.c.
#define DEFAULT_GAUSSIAN_RADIUS 1.0 |
Definition at line 137 of file gd_interpolation.c.
#define DEFAULT_HAMMING_RADIUS 1.0 |
Definition at line 139 of file gd_interpolation.c.
#define DEFAULT_HANNING_RADIUS 1.0 |
Definition at line 138 of file gd_interpolation.c.
#define DEFAULT_HERMITE_RADIUS 1.0 |
Definition at line 126 of file gd_interpolation.c.
#define DEFAULT_LANCZOS3_RADIUS 3.0 |
Definition at line 125 of file gd_interpolation.c.
#define DEFAULT_LANCZOS8_RADIUS 8.0 |
Definition at line 124 of file gd_interpolation.c.
#define DEFAULT_MITCHELL_RADIUS 2.0 |
Definition at line 131 of file gd_interpolation.c.
#define DEFAULT_QUADRATIC_RADIUS 1.5 |
Definition at line 134 of file gd_interpolation.c.
#define DEFAULT_QUADRATICBSPLINE_RADIUS 1.5 |
Definition at line 135 of file gd_interpolation.c.
#define DEFAULT_SINC_RADIUS 1.0 |
Definition at line 140 of file gd_interpolation.c.
#define DEFAULT_TRIANGLE_RADIUS 1.0 |
Definition at line 128 of file gd_interpolation.c.
#define DEFAULT_WELSH_RADIUS 1.0 |
Definition at line 141 of file gd_interpolation.c.
#define gd_divfx | ( | x, | |
y ) |
Definition at line 104 of file gd_interpolation.c.
#define gd_dtofx | ( | x | ) |
Definition at line 89 of file gd_interpolation.c.
#define gd_ftofx | ( | x | ) |
Definition at line 86 of file gd_interpolation.c.
#define gd_fxtod | ( | x | ) |
Definition at line 98 of file gd_interpolation.c.
#define gd_fxtof | ( | x | ) |
Definition at line 95 of file gd_interpolation.c.
#define gd_fxtoi | ( | x | ) |
Definition at line 92 of file gd_interpolation.c.
#define gd_itofx | ( | x | ) |
Definition at line 83 of file gd_interpolation.c.
#define gd_mulfx | ( | x, | |
y ) |
Definition at line 101 of file gd_interpolation.c.
#define KM_B (1.0f/3.0f) |
#define KM_C (1.0f/3.0f) |
Definition at line 77 of file gd_interpolation.c.
Definition at line 73 of file gd_interpolation.c.
typedef long gdFixed |
Definition at line 81 of file gd_interpolation.c.
typedef enum GD_RESIZE_FILTER_TYPE gdResizeFilterType |
Definition at line 170 of file gd_interpolation.c.
Definition at line 143 of file gd_interpolation.c.
Definition at line 2214 of file gd_interpolation.c.
gdInterpolationMethod gdImageGetInterpolationMethod | ( | gdImagePtr | im | ) |
Function: gdImageGetInterpolationMethod
Get the current interpolation method
This is here so that the value can be read via a language or VM with an FFI but no (portable) way to extract the value from the struct.
Parameters: im - The image.
Returns: The current interpolation method.
See also:
Definition at line 2563 of file gd_interpolation.c.
gdImagePtr gdImageRotateBicubicFixed | ( | gdImagePtr | src, |
const float | degrees, | ||
const int | bgColor ) |
Definition at line 1857 of file gd_interpolation.c.
gdImagePtr gdImageRotateBilinear | ( | gdImagePtr | src, |
const float | degrees, | ||
const int | bgColor ) |
Definition at line 1742 of file gd_interpolation.c.
gdImagePtr gdImageRotateGeneric | ( | gdImagePtr | src, |
const float | degrees, | ||
const int | bgColor ) |
Definition at line 1688 of file gd_interpolation.c.
gdImagePtr gdImageRotateInterpolated | ( | const gdImagePtr | src, |
const float | angle, | ||
int | bgcolor ) |
Definition at line 2123 of file gd_interpolation.c.
gdImagePtr gdImageRotateNearestNeighbour | ( | gdImagePtr | src, |
const float | degrees, | ||
const int | bgColor ) |
Definition at line 1631 of file gd_interpolation.c.
gdImagePtr gdImageScale | ( | const gdImagePtr | src, |
const unsigned int | new_width, | ||
const unsigned int | new_height ) |
Definition at line 1577 of file gd_interpolation.c.
gdImagePtr gdImageScaleBicubicFixed | ( | gdImagePtr | src, |
const unsigned int | width, | ||
const unsigned int | height ) |
Definition at line 1352 of file gd_interpolation.c.
gdImagePtr gdImageScaleBilinear | ( | gdImagePtr | im, |
const unsigned int | new_width, | ||
const unsigned int | new_height ) |
Definition at line 1343 of file gd_interpolation.c.
gdImagePtr gdImageScaleNearestNeighbour | ( | gdImagePtr | im, |
const unsigned int | width, | ||
const unsigned int | height ) |
Definition at line 1097 of file gd_interpolation.c.
gdImagePtr gdImageScaleTwoPass | ( | const gdImagePtr | src, |
const unsigned int | src_width, | ||
const unsigned int | src_height, | ||
const unsigned int | new_width, | ||
const unsigned int | new_height ) |
Definition at line 1048 of file gd_interpolation.c.
int gdImageSetInterpolationMethod | ( | gdImagePtr | im, |
gdInterpolationMethod | id ) |
Definition at line 2466 of file gd_interpolation.c.
Function: gdTransformAffineBoundingBox Returns the bounding box of an affine transformation applied to a rectangular area <gdRect>
Parameters: src - Rectangular source area for the affine transformation affine - the affine transformation bbox - the resulting bounding box
Returns: GD_TRUE if the affine is rectilinear or GD_FALSE
Definition at line 2426 of file gd_interpolation.c.
int gdTransformAffineCopy | ( | gdImagePtr | dst, |
int | dst_x, | ||
int | dst_y, | ||
const gdImagePtr | src, | ||
gdRectPtr | src_region, | ||
const double | affine[6] ) |
Function: gdTransformAffineCopy Applies an affine transformation to a region and copy the result in a destination to the given position.
Parameters: dst - Image to draw the transformed image src - Source image dstX - X position in the destination image dstY - Y position in the destination image src_area - Rectangular region to rotate in the src image
Returns: GD_TRUE on success or GD_FALSE on failure
Definition at line 2301 of file gd_interpolation.c.
int gdTransformAffineGetImage | ( | gdImagePtr * | dst, |
const gdImagePtr | src, | ||
gdRectPtr | src_area, | ||
const double | affine[6] ) |
Function: gdTransformAffineGetImage Applies an affine transformation to a region and return an image containing the complete transformation.
Parameters: dst - Pointer to a gdImagePtr to store the created image, NULL when the creation or the transformation failed src - Source image src_area - rectangle defining the source region to transform dstY - Y position in the destination image affine - The desired affine transformation
Returns: GD_TRUE if the affine is rectilinear or GD_FALSE
Definition at line 2235 of file gd_interpolation.c.
int getPixelInterpolated | ( | gdImagePtr | im, |
const double | x, | ||
const double | y, | ||
const int | bgColor ) |
Function: getPixelInterpolated Returns the interpolated color value using the default interpolation method. The returned color is always in the ARGB format (truecolor).
Parameters: im - Image to set the default interpolation method y - X value of the ideal position y - Y value of the ideal position method - Interpolation method <gdInterpolationMethod>
Returns: GD_TRUE if the affine is rectilinear or GD_FALSE
See also: <gdSetInterpolationMethod>
Definition at line 739 of file gd_interpolation.c.