PHP Classes

Manejo Imagenes: API to perform image manipulation operations

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 95 All time: 9,862 This week: 455Up
Version Licenses PHP version Categories
manejo-imagenes 1.0MIT/X Consortium ...5PHP 5, Graphics, Web services
Description 

Author

This package provides an API to perform image manipulation operations.

It provides a class that can handle several types of requests to perform operations on images.

Currently it can:

- Store image data in a database

- Rotate an image

- Crop an image

- Make a thumbnail

Innovation Award
PHP Programming Innovation award nominee
March 2023
Number 3
Many PHP applications need to process images in many ways.

This package provides an API that can handle HTTP requests that send images for processing and return the processed image as a response.

The package can store the images sent to the server in a database. This way, the API can perform several image processing operations, and only when the client applications are made the API returns the final image that was processed.

Manuel Lemos
Picture of Alfredo Rodriguez
  Performance   Level  
Name: Alfredo Rodriguez <contact>
Classes: 2 packages by
Country: Costa Rica Costa Rica
Age: 47
All time rank: 43824 in Costa Rica Costa Rica
Week rank: 245 Up1 in Costa Rica Costa Rica Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php

header
('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With');
header('Access-Control-Allow-Methods: GET, PUT, POST, OPTIONS');
/**
 * Description of Index
 *
 * @author Jose Alfredo Rodriguez <alfredo@jarscr.com>
 * @copyright JARS Costa Rica
 */


require_once "RHApi.php";
$RHApi = new RHApi();
$RHApi->API();


Details

Desarrolla JARS Costa Rica

Información del Proyecto

API de conexión App Movil

Configuración

Config.php

define('_MYSQL_SERVER', 'localhost');
define('_MYSQL_USER', 'DBUSER');
define('_MYSQL_PASSWORD', 'DBPASS');
define('_MYSQL_DATABASE', 'DBNAME');

ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(E_ALL);

RHApi.php

El archivo contiene las rutas que se utilizarán para el llamado de funciones

La mayor parte de los llamados requieren POST

API EndPoints y Request

Cargar Foto al capturar

https://appm.jarscr.com/actualizar/empleadoFoto

Al resultado de la captura se le agregar "image/jpeg;base64," seguido de la cadena de Base64, el conector de la camara devuelve en base64 las imagenes.

Request:
{
    "FotoUpdate": "image/jpeg;base64,bG9nby1wZXJmaWwuanBn",
    "IdEmpleado":1882
}

Result:
{
    "result": "success",
    "Foto": "data:image/jpg;base64,bG9nby1wZXJmaWwuanBn"
}

Rotar Foto

https://appm.jarscr.com/actualizar/imagenrotar

Request: 
{
    "IdEmpleado": 1882,
    "Rotacion": 3
}

Result:
{
    "result": "success",
    "Foto": "data:image/jpg;base64,bG9nby1wZXJmaWwuanBn"
}

Créditos

  • [Alfredo Rodriguez] @jarscr

  Files folder image Files  
File Role Description
Files folder imageClases (1 file)
Accessible without login Plain text file Config.php Conf. Configuration script
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation
Plain text file RHApi.php Class Class source

  Files folder image Files  /  Clases  
File Role Description
  Plain text file Imagenes.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:95
This week:0
All time:9,862
This week:455Up