FLUTTER PHPTHUMB CUSTOM OPTIONS LIST src = filename of source image new = create new image, not thumbnail of existing image. Requires "w" and "h" parameters set. [ex: &new=FF0000|75] - red background, 75% opacity Set to hex color string of background. Opacity is optional (defaults to 100% opaque). w = max width of output thumbnail in pixels h = max height of output thumbnail in pixels wp = max width for portrait images hp = max height for portrait images wl = max width for landscape images hl = max height for landscape images ws = max width for square images hs = max height for square images f = output image format ("jpeg", "png", or "gif") q = JPEG compression (1=worst, 95=best, 75=default) sx = left side of source rectangle (default = 0) (values 0 < sx < 1 represent percentage) sy = top side of source rectangle (default = 0) (values 0 < sy < 1 represent percentage) sw = width of source rectangle (default = fullwidth) (values 0 < sw < 1 represent percentage) sh = height of source rectangle (default = fullheight) (values 0 < sh < 1 represent percentage) zc = zoom-crop. Will auto-crop off the larger dimension so that the image will fill the smaller dimension (requires both "w" and "h", overrides "iar", "far") Set to "1" or "C" to zoom-crop towards the center, or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR" to gravitate towards top/left/bottom/right directions (requies ImageMagick for values other than "C" or "1") bg = background hex color (default = FFFFFF) bc = border hex color (default = 000000) fltr = filter system. Call as an array as follows: - "brit" (Brightness) [ex: &fltr[]=brit|] where ] where can be a number >0 to 10+ (default 1.0) Must be >0 (zero gives no effect). There is no max, although beyond 10 is pretty useless. Negative numbers actually do something, maybe not quite the desired effect, but interesting nonetheless. - "sat" (SATuration) [ex: &fltr[]=sat|] where is a number between zero (no change) and -100 (complete desaturation = grayscale), or it can be any positive number for increased saturation. - "ds" (DeSaturate) [ex: &fltr[]=ds|] is an alias for "sat" except values are inverted (positive values remove color, negative values boost saturation) - "gray" (Grayscale) [ex: &fltr[]=gray] remove all color from image, make it grayscale - "th" (Threshold) [ex: &fltr[]=th|] makes image greyscale, then sets all pixels brighter than (range 0-255) to white, and all pixels darker than to black - "rcd" (Reduce Color Depth) [ex: &fltr[]=rcd||] where is the number of colors (2-256) you want in the output image, and is "1" for dithering (deault) or "0" for no dithering - "clr" (Colorize) [ex: &fltr[]=clr||] where is a number between 0 and 100 for the amount of colorization, and is the hex color to colorize to. - "sep" (Sepia) [ex: &fltr[]=sep||] where is a number between 0 and 100 for the amount of colorization (default=50), and is the hex color to colorize to (default=A28065). Note: this behaves differently when applied by ImageMagick, in which case 80 is default, and lower values give brighter/yellower images and higher values give darker/bluer images - "usm" (UnSharpMask) [ex: &fltr[]=usm|||] where is the amount (default = 80), is the radius (default = 0.5), is the threshold (default = 3). - "blur" (Blur) [ex: &fltr[]=blur|] where (0 < < 25) (default = 1) - "gblr" (Gaussian Blur) [ex: &fltr[]=gblr] Availble in PHP5 with bundled GD only. - "sblr" (Selective Blur) [ex: &fltr[]=gblr] Availble in PHP5 with bundled GD only. - "smth" (Smooth) [ex: &fltr[]=smth|] where is the weighting value for the matrix (range -10 to 10, default 6) Availble in PHP5 with bundled GD only. - "lvl" (Levels) [ex: &fltr[]=lvl|||d where can be one of "r", "g", "b", "a" (for Red, Green, Blue, Alpha respectively), or "*" for all RGB channels (default) based on grayscale average. ImageMagick methods can support multiple channels (eg "lvl|rg|3") but internal methods cannot (they will use first character of channel string as channel) can be one of: 0=Internal RGB; 1=Internal Grayscale; 2=ImageMagick Contrast-Stretch (default) 3=ImageMagick Normalize (may appear over-saturated) is how much of brightest/darkest pixels will be clipped in percent (default = 0.1%) Using default parameters (&fltr[]=lvl) is similar to Auto Contrast in Adobe Photoshop. - "wb" (White Balance) [ex: &fltr[]=wb|] where is the target hex color to white balance on, this color is what "should be" white, or light gray. The filter attempts to maintain brightness so any gray color can theoretically be used. If is omitted the filter guesses based on brightest pixels in each of RGB OR can be the percent of white clipping used to calculate auto-white-balance (default = 0.1%) NOTE: "wb" in default settings already gives an effect similar to "lvl", there is usually no need to use "lvl" if "wb" is already used. - "hist" (Histogram) [ex: &fltr[]=hist||||||||] Where is the color band(s) to display, from back to front (one or more of "rgba*" for Red Green Blue Alpha and Grayscale respectively); is a semicolon-seperated list of hex colors to use for each graph band (defaults to FF0000, 00FF00, 0000FF, 999999, FFFFFF respectively); and are the width and height of the overlaid histogram in pixels, or if <= 1 then percentage of source image width/height; is the alignment (same as for "wmi" and "wmt"); is opacity from 0 (transparent) to 100 (opaque) (requires PHP v4.3.2, otherwise 100% opaque); and are the edge margin in pixels (or percent if 0 < (x|y) < 1) - "over" (OVERlay/underlay image) overlays an image on the thumbnail, or overlays the thumbnail on another image (to create a picture frame for example) [ex: &fltr[]=over||||] where is the image filename; is "0" (default) for overlay the image on top of the thumbnail or "1" for overlay the thumbnail on top of the image; is the margin - can be absolute pixels, or if < 1 is a percentage of the thumbnail size [must be < 0.5] (default is 0 for overlay and 10% for underlay); is opacity (0 = transparent, 100 = opaque) (requires PHP v4.3.2, otherwise 100% opaque); (thanks raynerape�gmail*com, shabazz3�msu*edu) - "wmi" (WaterMarkImage) [ex: &fltr[]=wmi||||||] where is the filename of the image to overlay; is the alignment (one of BR, BL, TR, TL, C, R, L, T, B, *) where B=bottom, T=top, L=left, R=right, C=centre, *=tile) *or* an absolute position in pixels (from top-left corner of canvas to top-left corner of overlay) in format {xoffset}x{yoffset} (eg: "10x20") note: this is center position of image if <>x and are set is opacity from 0 (transparent) to 100 (opaque) (requires PHP v4.3.2, otherwise 100% opaque); and are the edge (and inter-tile) margin in pixels (or percent if 0 < (x|y) < 1) *or* if is absolute-position format then and represent maximum width and height that the watermark image will be scaled to fit inside is rotation angle of overlaid watermark - "wmt" (WaterMarkText) [ex: &fltr[]=wmt|||||||||||] where: is the text to use as a watermark; URLencoded Unicode HTMLentities must be used for characters beyond chr(127). For example, the "eighth note" character (U+266A) is represented as "♪" and then urlencoded to "%26%239834%3B" Any instance of metacharacters will be replaced with their calculated value. Currently supported: ^Fb = source image filesize in bytes ^Fk = source image filesize in kilobytes ^Fm = source image filesize in megabytes ^X = source image width in pixels ^Y = source image height in pixels ^x = thumbnail width in pixels ^y = thumbnail height in pixels ^^ = the character ^ is the font size (1-5 for built-in font, or point size for TrueType fonts); is the alignment (one of BR, BL, TR, TL, C, R, L, T, B, * where B=bottom, T=top, L=left, R=right, C=centre, *=tile); *or* an absolute position in pixels (from top-left corner of canvas to top-left corner of overlay) in format {xoffset}x{yoffset} (eg: "10x20") is the hex color of the text; is the filename of the TTF file (optional, if omitted a built-in font will be used); is opacity from 0 (transparent) to 100 (opaque) (requires PHP v4.3.2, otherwise 100% opaque); is the edge (and inter-tile) margin in percent; is the angle is the hex color of the background; is background opacity from 0 (transparent) to 100 (opaque) (requires PHP v4.3.2, otherwise 100% opaque); is the direction(s) in which the background is extended (either "x" or "y" (or both, but both will obscure entire image)) Note: works with TTF fonts only, not built-in - "flip" [ex: &fltr[]=flip|x or &fltr[]=flip|y] flip image on X or Y axis - "ric" [ex: &fltr[]=ric||] rounds off the corners of the image (to transparent for PNG output), where is the horizontal radius of the curve and is the vertical radius - "elip" [ex: &fltr[]=elip] similar to rounded corners but more extreme - "mask" [ex: &fltr[]=mask|filename.png] greyscale values of mask are applied as the alpha channel to the main image. White is opaque, black is transparent. - "bvl" (BeVeL) [ex: &fltr[]=bvl|||] where is the bevel width, is the hex color for the top and left shading, is the hex color for the bottom and right shading - "bord" (BORDer) [ex: &fltr[]=bord||||<>c where is the width in pixels, and are horizontal and vertical radii for rounded corners, and is the hex color of the border - "fram" (FRAMe) draws a frame, similar to "bord" but more configurable [ex: &fltr[]=fram|||||] where is the width of the main border, is the width of each side of the bevel part, is the hex color of the main border, is the highlight bevel color, is the shadow bevel color - "drop" (DROP shadow) [ex: &fltr[]=drop||||] where is distance from image to shadow, is width of shadow fade (not yet implemented), is the hex color of the shadow, and is the angle of the shadow (default=225) - "crop" (CROP image) [ex: &fltr[]=crop||||] where is the number of pixels to crop from the left side of the resized image; , , are for right, top and bottom respectively. Where (0 < x < 1) the value will be used as a percentage of width/height. Left and top crops take precedence over right and bottom values. Cropping will be limited such that at least 1 pixel of width and height always remains. - "rot" (ROTate) [ex: &fltr[]=rot||] where is the rotation angle in degrees; is the background hex color. Similar to regular "ra" parameter but is applied in filter order after regular processing so you can rotate output of other filters. - "size" (reSIZE) [ex: &fltr[]=size|||] where is the horizontal dimension in pixels, is the vertical dimension in pixels, is boolean whether to stretch (if 1) or resize proportionately (0, default) and will be interpreted as percentage of current output image size if values are (0 < X < 1) NOTE: do NOT use this filter unless absolutely neccesary. It is only provided for cases where other filters need to have absolute positioning based on source image and the resultant image should be resized after other filters are applied. This filter is less efficient than the standard resizing procedures. - "stc" (Source Transparent Color) [ex: &fltr[]=stc|||