Download the PHP package pjam/prig without Composer

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

prig - Php Random Image Generator

prig


This project was born just out of sheer curiosity on finding out how an image generated with randomly colored pixels, using PHP, would look like.

After the first successful try, I decided to host this somewhere to be able to use this for demo placeholder images on other projects easily by just setting an url on an image tag source attribute.

Then, since I was already using a git repository to hold my code, why not make it a downloadable package to allow usage locally without external requests?

So, to share it with everyone I released it publicly. I hope it can be of some use for anyone.

Usage

Using html image src

You can just point the src attribute of an image tag to the site where it is currently hosted (https://polar-mountain-75010.herokuapp.com/image.php)

Installing the package and creating the image on your PHP code

For now, until the package is published on packagist, you can installing it using git.

Requirements

Options

You can pass your desired options either by adding them as GET parameters on the query string of the image tag source attribute or as elements of the options array passed to the class constructor.

Any invalid value will be ignored and defaults will be used as fallback.

height (int, default: 200, min: 1, max: 2000)

The height of the image, in pixels.

Examples:

width (int, default: 200, min: 1, max: 2000)

The width of the image, in pixels.

Examples:

type (string, default: 'png', accepted values: 'png', 'jpg|jpeg', 'webp')

The type and/or output format of the image.

Examples:

numColors (?int, default: null, min: 1, max: 256)

The number of different colors to be used in the image. If not provided, it will try to set a different color for each pixel

Examples:

License

prig is released under the MIT License. See the bundled LICENSE file for details.

Contributing

Any contributions are welcome. Just drop in a pull request.


All versions of prig with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-gd Version *
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 pjam/prig contains the following files

Loading the files please wait ....