Download the PHP package componenta/image-converter without Composer

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

Componenta Image Converter

Image conversion contracts and GD-backed image converters for Componenta. The package keeps low-level GD calls behind small contracts and provides an ImageConverter orchestrator that selects a target converter by requested output type and validates the source MIME type through componenta/mimetype-detector.

Requirements

Installation

The package declares Componenta\Image\ConfigProvider in extra.componenta.config-providers. When componenta/composer-plugin is installed, the provider is added to the generated provider list automatically.

Main API

ImageConverterInterface is the low-level contract implemented by single-target converters:

ImageConverter is the orchestrator for application code that needs to choose the target format at runtime:

$source may be a binary string or Psr\Http\Message\StreamInterface. Target types accept short names and MIME types, for example webp, image/webp, jpg, jpeg, image/jpeg, png, and image/avif.

Built-In Converters

Converter Target Supported source MIME types
GdWebPConverter webp, image/webp JPEG, PNG, BMP. GIF is intentionally not supported because GD would drop animation.
GdJpegConverter jpeg, jpg, image/jpeg PNG, WebP, AVIF, BMP. Alpha is flattened onto a white background.
GdPngConverter png, image/png JPEG, WebP, AVIF, BMP. Alpha is preserved when available.
GdAvifConverter avif, image/avif JPEG, PNG, WebP, BMP when the local GD build supports imageavif().

For JPEG, WebP, and AVIF, quality is 0..100. For PNG, the same quality range is mapped to GD compression level 0..9.

Extension Points

Implement ImageConverterInterface for a new backend or target format. If the converter also implements ImageConversionTargetsProviderInterface, the orchestrator can read its conversionTargets property automatically:

Converters can be added after construction:

When target types are passed explicitly to addConverter(), they override the optional provider property for registration.

Failure Model

ImageConverter throws ConversionException when:

Treat conversion as an infrastructure boundary: validate upload constraints before conversion and handle conversion failure as a user-facing invalid media error.

DI Registration

ConfigProvider registers:

ImageConverterFactory uses MimeTypeDetectorInterface from the container when available and falls back to FinfoDetector.


All versions of image-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-gd Version *
componenta/mimetype-detector Version ^1.0
psr/container Version ^2.0
psr/http-message Version ^2.0
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 componenta/image-converter contains the following files

Loading the files please wait ...