Download the PHP package erikaheidi/gdaisy without Composer

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

gdaisy logo

gdaisy

A highly experimental image templating system based on PHP-GD to dynamically generate image banners and covers. GDaisy also comes with a few sample scripts to generate common size thumbnails via bin/gdaisy.

Installation

1. Require erikaheidi/gdaisy in your project using Composer:

2. Once it's installed, you can run the default script to generate an example cover based on meta tags.

Gdaisy comes with an example script that generates a header image adequately sized for Twitter, based on a default template. The vendor/bin/gdaisy generate script expects the URL to fetch as first parameter and the output path as second parameter, as follows:

This will generate the following image:

gdaisy generated cover image

This command is defined in vendor/erikaheidi/gdaisy/bin/Command/Generate/CoverController.php, and the JSON template for this cover is defined at resources/templates/cover-default.json.

Using GDaisy Scripts

GDaisy comes with a few sample scripts in bin/Command based on default templates at resources/templates. These commands are available through the gdaisy bin script installed with Composer.

Resize

Resizes to a specific size, cropping the image to fully fit in the designated area.

Sizes:

Defined in resources/templates/resize-*.json:

Generate

Generates a generic banner based on Twitter meta tags in a page, or a page's title and description in case the twitter: tags aren't available.

Creating Templates

In GDaisy, a Template is composed by Placeholders. A placeholder is like an image layer.

Placeholders must implement the PlaceholderInterface. Currently, there are two types of placeholders:

There are two ways of setting up templates. You can programmatically define templates, and/or you can use a JSON file specification.

Programmatically Defining Templates

For basic templates, for instance to set up a resized thumbnail or add a watermark to an image, you can define the template along in your controller or script code.

This will generate a 150x150 thumbnail for the specified image, which could be provided as argument to the script for instance.

If your template has many placeholders or uses text, it might be easier to work with a JSON file instead.

Using a JSON Template

Consider the following basic.json template example:

This template has two elements: title (type text) and thumbnail (type image).

Following, a PHP script to generate a new image based on the example template:

Template / Placeholders Reference

Template Properties:

Text Properties:

Image Properties:

Example Templates

Creates a circle avatar sized 600x600 with white background

Creates a rounded avatar sized 600x600 with white background


All versions of gdaisy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-gd Version *
ext-json Version *
minicli/minicli Version ^3.2
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 erikaheidi/gdaisy contains the following files

Loading the files please wait ....