kuloha.blogg.se

Simpleimage php
Simpleimage php











simpleimage php

$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.flip($direction)įlip the image horizontally or vertically. $width* (int) - The width to resize the image to.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. Or include the library manually: 96, 1 => 96] getWidth()

#Simpleimage php install

Install with Composer: composer require claviska/simpleimage

  • 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.
  • simpleimage php

    Handle errors echo $err-> getMessage() > toScreen() // output to the screen // And much more! 💪 > 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 > colorize( 'DarkBlue') // tint dark blue > autoOrient() // adjust orientation based on exif data Overview fromFile( 'image.jpg') // load image.jpg If this project has you loving PHP image manipulation again, please consider sponsoring me to support its development. A PHP class that makes working with images as simple as possible.ĭeveloped and maintained by Cory LaViska.













    Simpleimage php