Download the PHP package tippingcanoe/imager without Composer

On this page you can find all versions of the php package tippingcanoe/imager. 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 imager

Imager

Have you ever wanted to smooth away the hassle of managing uploaded images in your Laravel 4 projects? Do you want to simplify the process of modifying and caching originally uploaded images? Look no further! Imager is a package designed to ease management of image storage, order and manipulation.

Features at a glance:

Setup

To get Imager ready for use in your project, take the usual steps for setting up a Laravel 4 pacakge.

Configuring

Storage

If you open the copy of config.php that was created by the last step during setup, you will see it is already populated with configuration options for the most typical of setups. The TippingCanoe\Imager\Storage\Filesystem driver is the most basic which simply stores image files in your site's public directory.

Amazon S3 Driver

Replace the filesystem driver configuration in the 'config.php' file with the Amazon AWS configuration below.

Filters

Imager's filtering chains are a powerful feature that allow you to orchestrate arbitrary combinations of manipulations when retrieving images. When processing a chain, Imager does the following for each filter in the chain:

You will most likely want to pre-configure filter chains for your project so that you don't have to repeat them over the course of retrieving variations. Imager uses a simple array schema to define filtering chains. Here's a sample of one:

If you're unsure as to where you should store your filter profiles, it's suggested that you place them in the filters.php file that has also been created for you when you published Imager's configuration earlier. This will allow you to vary the filter configurations along with your environments and will make retrieval as simple as Config::get('imager::filters.filter_name')

Usage

Depending on the nature of your implementation, the means by which you will receive image files will vary. Imager makes no assumptions about your request lifecycle (or that there's even a request at all!) and only concerns itself with recieving instances of Symfony\Component\HttpFoundation\File\File.

The two optional, secondary pieces of information that Imager makes use of are Imageable to scope to a specific model and filter chains during retrieval.

Trait

If you plan on attaching images to a model (User, Item, Gallery), that model must implement the interface TippingCanoe\Imager\Model\Imageable. This will mandate a method that you can either implement yourself or conveniently keep in sync with Imager by using the trait TippingCanoe\Imager\Model\ImageableImpl.

Saving

Saving images is done via the Imager service which can either be accessed via the facade or through dependency injection.

Imager will return an instance of TippingCanoe\Imager\Model\Image upon a successful save. If you supplied one, the image record will be associated with an imageable. Any additional attributes will be passed through to the save as well.

Retrieval

When retrieving an individual image, you will need a way to identify it:

Most of the time you will have at least one of these three pieces of information which will then allow you to obtain a URI to the physical file of the image.

When retrieving images from imager, it's helpful to remember that anywhere you see "imageable" is optional and omitting it or providing null means "global". Similarly, "filters" is also optional and omitting this value, providing null or an empty array will mean "the original image".

Slots

Imager features a concept known as slots which at it's very core is just a string value. Slots are used to order and/or key images by their imageable. There are helper scopes on the TippingCanoe\Imager\Model\Image class to help with retrieving images based on their slot values.

A sample use case for slots would be an "Item" class that can have an image gallery as well as a "primary" image. Images belonging to the gallery would have slots that are numeric so that they can be kept in a specific order while the primary image is in a named slot that can be queried directly.

Batches

It's common for implementations to require a way to submit multiple changes to an imageable's images in a single pass. These changes can sometimes present conflicts and be challenging to resolve.

As a convenience, Imager supplies a batch method off the service that allows these bulk operations to be performed. The operations are scoped by imageable and performed slot-by-slot in a safe order.

The structure of the schema is caller agnostic and in the unavoidable case of a conflict will null-out the slot of any images being displaced.

Here's a sample of the schema used when performing batch operations:

In this example, the following actions would be taken - in order:

The file array $newFiles will be keyed by slot and could in theory contain new a new image for slot 4.

When an image is told to move to a new slot, if there is one aready in the target slot, they are swapped. If an uploaded image attempts to go into an already-occupied slot, the image currently in the slot will have it's slot nulled out.

It's important to note that slot keys cannot be duplicated in this schema, so it's in your best interest to submit the simplest batch list possible.

Drivers

More drivers will be added over time and we are always interested in hearing suggestions for new ones or receiving pull requests with your own ideas. Creating a driver is as simple as implementing the interface TippingCanoe\Imager\Storage\Driver which is fully documented. You can also use TippingCanoe\Imager\Storage\Filesystem as a reference.

Filters

It's very easy to create your own filters within your own project or packages. You're also more than welcome to use whatever image processing libraries and/or algorithms you wish.

The only rule is that filter subclasses must perform their manipulations to the file provided without moving, renaming or deleting it - overwriting is fine. The process method is not expected to return a value.

Meta

If you encounter any issues, find a bug or have any questions, feel free to open a ticket in the issue tracker.

Credits

Imager is created and maintained by Alexander Trauzzi at Tipping Canoe.


All versions of imager with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
laravel/framework Version 4.*
intervention/image Version 2.*
stojg/crop Version 1.*
aws/aws-sdk-php Version 2.5.2
rjkip/ftp-php Version 1.1.*
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 tippingcanoe/imager contains the following files

Loading the files please wait ....