Download the PHP package devedge/photo-desc without Composer

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

Photo Description Generator (v0.2.1)

This PHP application reads photos from an input folder and uses OpenRouter's AI models to generate tags and descriptions, saving them as JSON metadata files.

Disclaimer

This project has been created vibe-coding using windsurf with the Claude 3.7 model. While it is functional, it may contain errors or bugs. Use at your own risk.

Setup

  1. Install dependencies:

  2. Copy .env.example to .env and edit it to add your OpenRouter API key:

  3. Place your photos in the input_photos directory (it will be created automatically on first run).

Usage

Batch Processing

Run the script without arguments to process all photos in the input directory:

The script will:

  1. Read all supported image files from the input_photos directory
  2. Skip already processed images (unless the original image has been modified)
  3. Automatically resize images larger than 5MB to meet API limitations
  4. Send each image to OpenRouter for analysis using the configured AI model
  5. Save the resulting tags and descriptions as JSON files in the output directory

Single Image Processing

You can also process a single image by providing its file path or URL as an argument:

When processing a single image, the script will output the metadata directly as JSON to stdout, rather than saving it to a file. By default, logging is suppressed in single-image mode to ensure clean JSON output. If you want to see the logs (for debugging), add the --log flag.

Asynchronous Processing with ReactPHP

This package also supports asynchronous processing using ReactPHP. This allows you to process images in a non-blocking way, which is particularly useful for web applications or when processing many images concurrently:

Configuration

You can configure the application by editing the .env file:

Output Format

Each processed image will generate a JSON file with the following structure:

Supported Image Formats

ReactPHP Integration

The package includes full ReactPHP support for asynchronous, non-blocking image processing:

This approach is ideal for web applications where you don't want to block while waiting for API responses.

Using as a Composer Package

This project can also be used as a composer package in other PHP applications. The OpenRouterService class is designed to be PSR-compliant and can be easily integrated into other projects.

Installation

Usage in Your Project

Synchronous Usage

Dependency Injection

The service uses PSR interfaces rather than concrete implementations, making it easy to integrate with various dependency injection containers:


All versions of photo-desc with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
psr/http-client Version ^1.0
psr/http-message Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^1.1 || ^2.0 || ^3.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 devedge/photo-desc contains the following files

Loading the files please wait ...