Download the PHP package forevermatt/mosaic without Composer

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

Mosaic Maker

A set of PHP classes for assembling a mosaic, designed to look like a given guide image, using a set of source images.

Usage

Pick a directory where the temp folder (used for caching source image data) can be kept. Open a command prompt in that folder, and run the following:

php <path/to/cli.php> <path/to/guide-image.jpg> <path/to/source/images/>

Replace the values in angle brackets with actual paths. For example, replace with something like (depending on where you cloned this repo to on your computer). Note that any additional command-line parameters are treated as additional folders containing source images to be used for generating the mosaic.

The first time you run this, it will probably take quite some time since it has not yet cached downsized copies of your source images (and therefor it has to do a lot of image resizing). The next (and subsequent) times should be much faster.

Basic Approach

A. Get guide image. B. Get source images. C. Slice up guide image. D. Match up each slice of the guide image with a different source image. E. Assemble and save mosaic.


C.1. Count source images.

  1. Slice guide image into no more than that many slices.

D.1. Downsize the slice to 3 pixels by 3 pixels. Record the RGB values of the pixels.

  1. Compare that with each of the source images.
  2. Make a note of which unused source image matches this slice best.

D.2.a. Downsize the source image to 3 pixels by 3 pixels. Record the RGB values of the pixels. b. Calculate the absolute difference of slice's pixels' colors with this source image's pixels' colors.


E.1. Create a new empty image.

  1. Insert each of the source images according to the matches found.

Match accuracy (at a given resolution) = D[1] + D[2] + ... + D[number of pixels]

D = abs(R[a] - R[b]) + abs(G[a] - G[b]) + abs(B[a] - B[b])

Only accuracy calculations at matching resolutions give a meaningful comparison.

Glossary

License

This software is under the MIT license.


All versions of mosaic with dependencies

PHP Build Version
Package Version
Requires behat/behat Version ^3.5
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 forevermatt/mosaic contains the following files

Loading the files please wait ....