thephpleague / color-extractor

Extract colors from an image like a human would do.
thephpleague.com
MIT License
1.3k stars 159 forks source link

How to use this without Composer #40

Closed xberg closed 8 years ago

xberg commented 8 years ago

Hi, I have no idea what Composer is. I do not have command line access on my server. Is there a way to use your package without Composer? Thanks

HellPat commented 8 years ago

Composer is a tool for managing PHP dependencies. You can read more about it here: https://getcomposer.org/doc/00-intro.md#introduction

It also provides an autoloader for classes. You can autoload all classes by requiring vendor/autoload.php.

You can see what the library depends on in the composer.json file. https://github.com/thephpleague/color-extractor/blob/master/composer.json

In this case there are no dependencies but gdlib and php >=5.4.0

You should look into composer. It's cool.

If you can't use conmposer on your server i recommend you one of the following:

You can use this without composer though... you have to require all the classes you use by yourself. In this case this 3 files: https://github.com/thephpleague/color-extractor/tree/master/src/League/ColorExtractor

that you can use it as in the docs.

BUT

extracting the colors of images are expensive tasks. You should propably not run them during the users request. Prefer to run it manually in the background or something.

And you really should look into composer. There are so many nice packages installable through a single command.

The Question is not a bug, too. If you need help with using it you're maybe better with posting your question to stackoverflow.

MatTheCat commented 8 years ago

Thanks @psren