`y`* (int) - Vertical offset in pixels. `x`* (int) - Horizontal offset in pixels. `yOffset` (int) - The vertical offset in pixels (default 0). `xOffset` (int) - The horizontal offset in pixels (default 0). 'top left', 'top right', 'bottom left', 'bottom right' (default 'center'). `anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right', `color` (string|array) - The text color (default black). `size` (int) - The size of the font in pixels (default 12). `fontFile`* (string) - The TrueType (or compatible) font file to use. `$options` (array) - An array of options. ![]() `$backgroundColor` (string|array) - The background color to use for the uncovered zone area after rotation (default 'transparent'). `$res_y` (int) - The vertical resolution, in DPI. `$res_x`* (int) - The horizontal resolution, in DPI. `$height`* (int) - The new image height.Ĭhanges the resolution (DPI) of an image. If only one dimension is specified, the image will be resized proportionally. Resize an image to the specified dimensions. $xOffset and $yOffset have no effect in center anchor. `$calculateOffsetFromEdge` (bool) - Calculate Offset referring to the edges of the image. `$yOffset` (int) - Vertical offset in pixels (default 0). `$xOffset` (int) - Horizontal offset in pixels (default 0). `$opacity` (float) - The opacity level of the overlay 0-1 (default 1). `$anchor` (string) - The anchor point: 'center', 'top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right' (default 'center') This can be a filename, a data URI, or a SimpleImage object. `$overlay`* (string|SimpleImage) - The image to overlay. Place an image on top of the current image. # `overlay($overlay, $anchor, $opacity, $xOffset, $yOffset)` `$dither` (bool) - Whether or not to use a dithering effect (default true). `$max`* (int) - The maximum number of colors to use. Reduces the image to a maximum number of colors. `$direction`* (string) - The direction to flip: x|y|both `$width`* (int) - The width to resize the image to.įlip the image horizontally or vertically. ![]() Please use `resize($width, null)` instead._ _This method was deprecated in version 3.2.2 and will be removed in version 4.0. Proportionally resize the image to a specific width. `$height`* (int) - The height to resize the image to. Please use `resize(null, $height)` instead._ Proportionally resize the image to a specific height. `$maxHeight`* (int) - The maximum height the image can be. `$maxWidth`* (int) - The maximum width the image can be. Proportionally resize the image to fit inside a specific width and height. It is safe to call this method on images that don't have exif data (no changes will be made). Rotates an image so the orientation will be correct based on its exif data. Load with Composer or manually (just one file) Support for alpha-transparency (GIF, PNG, WEBP) `LightBlue`), a hex color, or an RGB(A) array. Color arguments can be passed in as any CSS color (e.g. Properties: exif data, height/width, mime type, orientation Utilities: color adjustment, darken/lighten color, extract colors Filters: blur, brighten, colorize, contrast, darken, desaturate, edge detect, emboss, invert, opacity, pixelate, sepia, sharpen, sketch Drawing: arc, border, dot, ellipse, line, polygon, rectangle, rounded rectangle ![]() Manipulation: crop, resize, overlay/watermark, adding TTF text Reads and writes files, data URIs, and image strings. Supports reading, writing, and converting GIF, JPEG, PNG, WEBP, BMP formats. >toFile('new-image.png', 'image/png') // convert to PNG and save a copy to new-image.png >overlay('watermark.png', 'bottom right') // add a watermark image >border('black', 10) // add a 10 pixel black border >autoOrient() // adjust orientation based on exif data _If this project has you loving PHP image manipulation again, please consider () to support its development._ A PHP class that makes working with images as simple as possible.ĭeveloped and maintained by ().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |