randomhost/webcamoverlay

Provides image overlay functionality for IP cam images.

2.0.0 2022-12-24 00:41 UTC

This package is auto-updated.

Last update: 2024-12-24 05:01:39 UTC


README

Build Status

randomhost/webcamoverlay

1. Purpose

This package was developed to compensate for the lack of image overlay capabilities of some less sophisticated IP cameras. It takes the original image as uploaded by the camera from the web server and uses the GD library to modify the image on the fly before displaying it to the website visitor.

Features:

  • picture watermarking with configurable image positions
  • text watermarking (original image "modified" date + freely configurable text)
  • configurable timed overlay image ("downtime" picture)
  • image scaling

2. Example

3. Usage

A basic approach at using this package could look like this:

<?php

declare(strict_types=1);

use \randomhost\Image\Webcam\Overlay;

require_once '/path/to/vendor/autoload.php';

$overlay = new Overlay();
$overlay->setWebcamImagePath('webcam.jpg');
$overlay->render();

This will instantiate the class, set the name of the uploaded webcam image and just render it without any overlay.

Assuming that you named this file webcam.php, you should now be able to access your webcam image at https://example.com/webcam.php

A more detailed example can be found in src/www/index.php.

4. License

See LICENSE.txt for full license details.