Download the PHP package offline-agency/image-puzzle without Composer

On this page you can find all versions of the php package offline-agency/image-puzzle. 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 image-puzzle

PHP Image Puzzle

CI codecov Downloads PHP

Split images into a grid of puzzle pieces, optionally apply edge styles, and export each piece as PNG (or JPEG) plus a JSON manifest with metadata (rows/cols, piece dimensions, x/y offsets, filenames).

Requirements: PHP 8.4 or 8.5, ext-gd.

Php Image Puzzle

Installation

Quickstart

Recommended (three steps):

One-shot (single call):

Parallel export (when ext-pcntl is loaded and PHP is CLI) for large grids:

Export and manifest

Each piece is saved as an image file (PNG by default). A manifest.json is written in the same directory with:

Example manifest snippet:

Splitting rule

When the image size is not evenly divisible by rows/cols, remainder pixels are assigned to the last row and last column. For example, a 100×50 image with 3 columns gives column widths 33, 33, 34; with 2 rows gives row heights 25, 25.

Documentation

JSON schemas for config and manifest: docs/schemas/ (edge-config.schema.json, puzzle-config.schema.json, piece.schema.json, manifest.schema.json). Config files are JSON-only; to use YAML or other formats, decode in your code (e.g. yaml_parse_file() if ext-yaml is available) and pass the resulting array to EdgeStyleFactory::fromArray($config).

Example script

Prints the manifest path and a short summary. Use --config=<path> to load edge style from a JSON config file. To use YAML, decode in your code and pass the array to EdgeStyleFactory::fromArray().

Image formats (GD)

Supported input formats: PNG, JPEG, GIF (as detected by GD). The exporter supports PNG and JPEG output.

Security

Troubleshooting

Extensions

Custom edge styles implement EdgeStyleInterface (see docs/EDGE_STYLES.md). Built-in styles include NoEdgeStyle, RoundedCornersStyle, and classic tab/socket styles (LineStyle, JigsawStyle, ArcStyle, HalfCircleStyle, SinusStyle). For per-side styles use CompositeEdgeStyle; for per-piece styles (e.g. by row/col or border vs inner) use ResolverEdgeStyle. You can create styles from JSON config with EdgeStyleFactory::fromArray() or EdgeStyleFactory::fromFile(). Third-party packages can provide additional styles as plugins.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

Inspired by the original pear/Image_Puzzle (archived). This project is a from-scratch implementation with a modern API (PHP 8.4+, Composer, edge styles, export manifest).

About us

Offline Agency is a web design agency based in Padua, Italy. You'll find an overview of our projects on our website.

License

The MIT License (MIT). Please see License File for more information.


All versions of image-puzzle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
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 offline-agency/image-puzzle contains the following files

Loading the files please wait ...