Download the PHP package ckdot/product-image-color-extractor without Composer

On this page you can find all versions of the php package ckdot/product-image-color-extractor. 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 product-image-color-extractor

kilb/product-image-color-extractor

kilb/product-image-color-extractor is a PHP library for extracting colors from product images like they are common in E-Commerce.

Installation

ImageMagick and PHP Imagick Module are required.

About

I've implemented this piece of software to find out what colors product images I imported from several APIs have. There were just two requirements I had:

  1. The result (colors) should be quite accurate

  2. The execution should be fast - so thousands of images must be processed after a few minutes

The following steps will be done to find out the color of an image:

  1. Top part of the image will be cropped. When I compared a lot of E-commerce images I found out that in most cases the content in top part is not that important like other parts (head of a person etc.)

  2. Resize image to a lower size. This will improve speed the speed of the following tasks.

  3. Reduce colors in image. This will make sure similar colors will be equalized and just a bunch of different colors will be returned.

  4. Remove background of the image. This will make sure, the most frequent color returned won't be white when the background color of the image is white.

  5. Iterate every pixel in the image. Every pixel will get a score. The score will be higher if the pixel is close to the center of the image. The score will be lower, if the pixel is a) closer to the image border or b) the color of the pixel has a skin tone. Score will be summed up for every different color.

  6. Score for every color will be calculated into relative %, colors will be returned by score - highest first.

Usage


All versions of product-image-color-extractor with dependencies

PHP Build Version
Package Version
No informations.
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 ckdot/product-image-color-extractor contains the following files

Loading the files please wait ....