Download the PHP package pteal79/image-annotator without Composer

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

pteal79/image-annotator

A NativePHP Mobile v4 plugin that opens a full-screen, fully native image annotation editor on iOS (Swift, UIKit) and Android (Kotlin, custom View). There is no WebView and no JavaScript.

The user draws freehand lines, straight lines, rectangles and text on an image. Everything stays editable until they save: shapes can be selected, moved, resized, restyled, re-ordered and deleted, with undo and redo for every change. On Save the annotations are flattened into a JPEG (quality 0.92, same pixel size as the input) in the app's cache dir, and the path comes back to Laravel as an event.

The plugin only works on local files. It never touches the network.

Contents

Requirements

Installation

During development, load it from a local folder with a path repository in your app's composer.json:

Register it with NativePHP, then rebuild:

The manifest adds one Android activity (AnnotatorActivity, not exported). Nothing is added to Info.plist.

Usage

Events

Every open() ends with exactly one of these events. The editor is dismissed before the event is sent.

Event Payload Meaning
ImageAnnotationSaved id, outputPath, width, height, reverted The user pressed Save. outputPath is a JPEG (quality 0.92) in the cache dir, named annotated-{id}-{timestamp}.jpg. reverted is true if Revert was used in this session
ImageAnnotationCancelled id The user closed without saving
ImageAnnotationFailed id, message The input could not be loaded, or the editor could not open. message is "already open" when open() was called while an editor was showing

All three live in Pteal79\ImageAnnotator\Events. Your app owns outputPath once the event arrives: move or upload it, then delete it.

Save failures do not send ImageAnnotationFailed. The editor shows "Couldn't save image" and stays open so the user can try again or close.

SuperNative example

The editor

Annotations are only held in memory. Nothing but the flattened JPEG is ever saved.

Behaviour notes

Where the spec left room, the plugin does this on both platforms:

Testing

The Pest suite covers the facade, the bridge parameters, the event payloads, the manifest and cross-platform consistency checks on the native sources. The native editors need a device or simulator.

License

MIT. See LICENSE.


All versions of image-annotator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
nativephp/mobile Version ^4.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 pteal79/image-annotator contains the following files

Loading the files please wait ...