Download the PHP package wendrowycz/skoch-filter-file-resize without Composer

On this page you can find all versions of the php package wendrowycz/skoch-filter-file-resize. 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 skoch-filter-file-resize

Skoch_Filter_File_Resize

Resize utility for the Zend Framework

Skoch_Filter_File_Resize is a utility for integrating image resizing into the Zend Framework's Zend_Form structure. It is implemented as a filter which you can attach to Zend_Form_Element_File instances.

Installation

Examples

The folders application and public contain examples for some basic usage. The most interesting file is application/forms/Image.php. You will need to have Zend-Framework installed to run the example.

Basic Usage

You can add the filter to your Zend_Form_Element_File instance.

This will scale the image to a maximum of 200px length and a maximum of 300px height. One of both sides will probably be a bit smaller, because we set keepRatio to true meaning that the aspect ratio (e.g. 3:4) shall be maintained. There also is a implicit defition of keepSmaller set to true meaning that if the image is already smaller, it shall not be enlarged (because that would lead to a lot of strange pixels).

Multiple thumbnails

Often you want to create several thumbnails in different sizes. This can be done by using a so called filter chain and the directory option of the Skoch_Filter_File_Resize.

If you specify directory, the value of setDestination() will not be considered anymore. Thus, you have to pass the full path to the directory option.

This will create two thumbnails, one of maximum 600px length and 300px height and the other of 500px length and 200px height. In each case, the aspect ratio will be kept. The smaller thumbnail will be saved to the folder /var/www/skoch/upload/medium while the larger one will use the default option set via Zend's setDestination() method.

Options / Arguments

You may specify different options for the Resize Filter:

Further information

You can find further information in the article on my blog.

License

This software is licensed under the Simplified BSD License.


All versions of skoch-filter-file-resize with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
zendframework/zendframework1 Version ~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 wendrowycz/skoch-filter-file-resize contains the following files

Loading the files please wait ....