Download the PHP package futurando-oficial/thumb-generator without Composer

On this page you can find all versions of the php package futurando-oficial/thumb-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thumb-generator

Overview

Requirements

Features

Installation

Install with Composer:

License

Licensed under the MIT license.

API

Order of awesomeness:

  1. Load an image
  2. Manipulate the image
  3. Save/output the image

API tips:

Loaders

fromDataUri($uri)

Loads an image from a data URI.

Returns a Generator object.

fromFile($file)

Loads an image from a file.

Returns a Generator object.

fromNew($width, $height, $color)

Creates a new image.

Returns a Generator object.

fromString($string)

Creates a new image from a string.

Returns a Generator object.

Savers

toDataUri($mimeType, $quality)

Generates a data URI.

Returns a string containing a data URI.

toDownload($filename, $mimeType, $quality)

Forces the image to be downloaded to the clients machine. Must be called before any output is sent to the screen.

Returns a Generator object.

toFile($file, $mimeType, $quality)

Writes the image to a file.

Returns a Generator object.

toScreen($mimeType, $quality)

Outputs the image to the screen. Must be called before any output is sent to the screen.

Returns a Generator object.

toString($mimeType, $quality)

Generates an image string.

Returns a Generator object.

Utilities

getAspectRatio()

Gets the image's current aspect ratio.

Returns the aspect ratio as a float.

getExif()

Gets the image's exif data.

Returns an array of exif data or null if no data is available.

getHeight()

Gets the image's current height.

Returns the height as an integer.

getMimeType()

Gets the mime type of the loaded image.

Returns a mime type string.

getOrientation()

Gets the image's current orientation.

Returns a string: 'landscape', 'portrait', or 'square'

getWidth()

Gets the image's current width.

Returns the width as an integer.

Manipulation

autoOrient()

Rotates an image so the orientation will be correct based on its exif data. It is safe to call this method on images that don't have exif data (no changes will be made). Returns a Generator object.

bestFit($maxWidth, $maxHeight)

Proportionally resize the image to fit inside a specific width and height.

Returns a Generator object.

crop($x1, $y1, $x2, $y2)

Crop the image.

Returns a Generator object.

fitToHeight($height) (DEPRECATED)

Proportionally resize the image to a specific height.

This method was deprecated in version 3.2.2 and will be removed in version 4.0. Please use resize(null, $height) instead.

Returns a Generator object.

fitToWidth($width) (DEPRECATED)

Proportionally resize the image to a specific width.

This method was deprecated in version 3.2.2 and will be removed in version 4.0. Please use resize($width, null) instead.

Returns a Generator object.

flip($direction)

Flip the image horizontally or vertically.

Returns a Generator object.

maxColors($max, $dither)

Reduces the image to a maximum number of colors.

Returns a Generator object.

overlay($overlay, $anchor, $opacity, $xOffset, $yOffset)

Place an image on top of the current image.

Returns a Generator object.

resize($width, $height)

Resize an image to the specified dimensions. If only one dimension is specified, the image will be resized proportionally.

Returns a Generator object.

rotate($angle, $backgroundColor)

Rotates the image.

Returns a Generator object.

text($text, $options, &$boundary)

Adds text to the image.

Returns a Generator object.

thumbnail($width, $height, $anchor)

Creates a thumbnail image. This function attempts to get the image as close to the provided dimensions as possible, then crops the remaining overflow to force the desired size. Useful for generating thumbnail images.

Returns a Generator object.

Drawing

arc($x, $y, $width, $height, $start, $end, $color, $thickness)

Draws an arc.

Returns a Generator object.

border($color, $thickness)

Draws a border around the image.

Returns a Generator object.

dot($x, $y, $color)

Draws a single pixel dot.

Returns a Generator object.

ellipse($x, $y, $width, $height, $color, $thickness)

Draws an ellipse.

Returns a Generator object.

fill($color)

Fills the image with a solid color.

Returns a Generator object.

line($x1, $y1, $x2, $y2, $color, $thickness)

Draws a line.

Returns a Generator object.

polygon($vertices, $color, $thickness)

Draws a polygon.

Returns a Generator object.

rectangle($x1, $y1, $x2, $y2, $color, $thickness)

Draws a rectangle.

Returns a Generator object.

roundedRectangle($x1, $y1, $x2, $y2, $radius, $color, $thickness)

Draws a rounded rectangle.

Returns a Generator object.

Filters

blur($type, $passes)

Applies the blur filter.

Returns a Generator object.

brighten($percentage)

Applies the brightness filter to brighten the image.

Returns a Generator object.

colorize($color)

Applies the colorize filter.

Returns a Generator object.

contrast($percentage)

Applies the contrast filter.

Returns a Generator object.

darken($percentage)

Applies the brightness filter to darken the image.

Returns a Generator object.

desaturate()

Applies the desaturate (grayscale) filter.

Returns a Generator object.

duotone($lightColor, $darkColor)

Applies the duotone filter to the image.

Returns a Generator object.

edgeDetect()

Applies the edge detect filter.

Returns a Generator object.

emboss()

Applies the emboss filter.

Returns a Generator object.

invert()

Inverts the image's colors.

Returns a Generator object.

opacity()

Changes the image's opacity level.

Returns a Generator object.

pixelate($size)

Applies the pixelate filter.

Returns a Generator object.

sepia()

Simulates a sepia effect by desaturating the image and applying a sepia tone.

Returns a Generator object.

sharpen($amount)

Sharpens the image.

Returns a Generator object.

sketch()

Applies the mean remove filter to produce a sketch effect.

Returns a Generator object.

Color utilities

(static) adjustColor($color, $red, $green, $blue, $alpha)

Adjusts a color by increasing/decreasing red/green/blue/alpha values independently.

Returns an RGBA color array.

(static) darkenColor($color, $amount)

Darkens a color.

Returns an RGBA color array.

extractColors($count = 10, $backgroundColor = null)

Extracts colors from an image like a human would do.™ This method requires the third-party library \League\ColorExtractor. If you're using Composer, it will be installed for you automatically.

Returns an array of RGBA colors arrays.

getColorAt($x, $y)

Gets the RGBA value of a single pixel.

Returns an RGBA color array or false if the x/y position is off the canvas.

(static) lightenColor($color, $amount)

Lightens a color.

Returns an RGBA color array.

(static) normalizeColor($color)

Normalizes a hex or array color value to a well-formatted RGBA array.

You can pipe alpha transparency through hex strings and color names. For example:

fff|0.50 <-- 50% white

red|0.25 <-- 25% red

Returns an array: [red, green, blue, alpha]

Exceptions

Generator throws standard exceptions when things go wrong. You should always use a try/catch block around your code to properly handle them.

To check for specific errors, compare $err->getCode() to the defined error constants.

As a best practice, always use the defined constants instead of their integers values. The values will likely change in future versions, and WILL NOT be considered a breaking change.

Useful Things To Know

Differences from Generator 2.x


All versions of thumb-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-gd Version *
league/color-extractor Version 0.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package futurando-oficial/thumb-generator contains the following files

Loading the files please wait ....