All Projects → cloudinary → Cloudinary_php

cloudinary / Cloudinary_php

Licence: mit
PHP extension for Cloudinary

Projects that are alternatives of or similar to Cloudinary php

Personalised-aesthetic-assessment-using-residual-adapters
Jupyter notebooks used as supporting material for an msc thesis about personalised aesthetic assessment using residual adapters.
Stars: ✭ 19 (-94.46%)
Mutual labels:  image-manipulation
UEGAN
[TIP2020] Pytorch implementation of "Towards Unsupervised Deep Image Enhancement with Generative Adversarial Network"
Stars: ✭ 68 (-80.17%)
Mutual labels:  image-manipulation
Cloudinary angular
Cloudinary Angular client library
Stars: ✭ 305 (-11.08%)
Mutual labels:  image-manipulation
node-imaginary
Minimalist node.js command-line & programmatic API client for imaginary
Stars: ✭ 94 (-72.59%)
Mutual labels:  image-manipulation
HistoGAN
Reference code for the paper HistoGAN: Controlling Colors of GAN-Generated and Real Images via Color Histograms (CVPR 2021).
Stars: ✭ 158 (-53.94%)
Mutual labels:  image-manipulation
Laravel Image
Image manipulation library for Laravel 4 and 5 based on Imagine (https://github.com/avalanche123/Imagine) and inspired by Croppa for easy url based manipulation (with caching)
Stars: ✭ 276 (-19.53%)
Mutual labels:  image-manipulation
automatic-manga-colorization
Use keras.js and cyclegan-keras to colorize manga automatically. All computation in browser. Demo is online:
Stars: ✭ 20 (-94.17%)
Mutual labels:  image-manipulation
Imgtoascii
A JavaScript implementation of a image to Ascii code
Stars: ✭ 331 (-3.5%)
Mutual labels:  image-manipulation
Awesome-ICCV2021-Low-Level-Vision
A Collection of Papers and Codes for ICCV2021 Low Level Vision and Image Generation
Stars: ✭ 163 (-52.48%)
Mutual labels:  image-manipulation
Cloudinary js
Cloudinary JavaScript library
Stars: ✭ 302 (-11.95%)
Mutual labels:  image-manipulation
closet
The Web Framework for Flashcards
Stars: ✭ 45 (-86.88%)
Mutual labels:  image-manipulation
VSGAN
VapourSynth Single Image Super-Resolution Generative Adversarial Network (GAN)
Stars: ✭ 124 (-63.85%)
Mutual labels:  image-manipulation
Faceswap Gan
A denoising autoencoder + adversarial losses and attention mechanisms for face swapping.
Stars: ✭ 3,099 (+803.5%)
Mutual labels:  image-manipulation
hermitage-skeleton
Hermitage Skeleton
Stars: ✭ 16 (-95.34%)
Mutual labels:  image-manipulation
Deep Generative Prior
Code for deep generative prior (ECCV2020 oral)
Stars: ✭ 308 (-10.2%)
Mutual labels:  image-manipulation
casia1groundtruth
Groundtruth images of tampering dataset CASIA 1.0
Stars: ✭ 27 (-92.13%)
Mutual labels:  image-manipulation
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (-25.66%)
Mutual labels:  image-manipulation
Opence
Contrast Enhancement Techniques for low-light images
Stars: ✭ 333 (-2.92%)
Mutual labels:  image-manipulation
Imbo
Imbo is an image "server" that can be used to add/get/delete images using a RESTful interface.
Stars: ✭ 312 (-9.04%)
Mutual labels:  image-manipulation
Pyvips
python binding for libvips using cffi
Stars: ✭ 296 (-13.7%)
Mutual labels:  image-manipulation

Build Status license Packagist Packagist

Cloudinary PHP SDK

Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.

Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website's graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.

Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.

Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.

For PHP, Cloudinary provides an extension for simplifying the integration even further.

Getting started guide

Take a look at our Getting started guide for PHP.

Setup

You can install through composer with:

composer require "cloudinary/cloudinary_php:^2"

Or download cloudinary_php from here

Note: cloudinary_php require PHP 5.6

Migration

See the Cloudinary PHP SDK Migration guide for more information on migrating to this version of the PHP SDK.

The previous (1.x) version of the SDK is located here.

Usage

Configuration

Each request for building a URL of a remote cloud resource must have the cloud_name parameter set. Each request to our secure APIs (e.g., image uploads, eager sprite generation) must have the api_key and api_secret parameters set. See API, URLs and access identifiers for more details.

Setting the cloud_name, api_key and api_secret parameters can be done either directly in each call to a Cloudinary method, by when initializing the Cloudinary object, or by using the CLOUDINARY_URL environment variable / system property.

The entry point of the library is the Cloudinary object.

$cloudinary = new Cloudinary();

Here's an example of setting the configuration parameters programatically:

$cloudinary = new Cloudinary(
    [
        'cloud' => [
            'cloud_name' => 'n07t21i7',
            'api_key'    => '123456789012345',
            'api_secret' => 'abcdeghijklmnopqrstuvwxyz12',
        ],
    ]
);

Another example of setting the configuration parameters by providing the CLOUDINARY_URL value to the constructor:

$cloudinary = new Cloudinary('cloudinary://123456789012345:[email protected]');

Embedding and transforming images

Any image uploaded to Cloudinary can be transformed and embedded using powerful view helper methods:

The following example generates the url for accessing an uploaded sample image while transforming it to fill a 100x150 rectangle:

$cloudinary->image('sample.jpg')->resize(Resize::fill()->width(100)->height(150);

Another example, embedding a smaller version of an uploaded image while generating a 90x90 face detection based thumbnail:

$cloudinary->image('woman.jpg')->resize(Resize::thumbnail()->width(90)->height(90)->gravity(Gravity::face());

Many other crop/resize modes can be found under Resize:: static builder, use your IDE for auto-complete options.

Upload

Assuming you have your Cloudinary configuration parameters defined (cloud_name, api_key, api_secret), uploading to Cloudinary is very simple.

The following example uploads a local JPG to the cloud:

$cloudinary->uploadApi->upload('my_picture.jpg');

The uploaded image is assigned a randomly generated public ID. The image is immediately available for a download through a CDN:

$cloudinary->image('abcfrmo8zul1mafopawefg.jpg');

# http://res.cloudinary.com/demo/image/upload/abcfrmo8zul1mafopawefg.jpg

You can also specify your own public ID:

$cloudinary->uploadApi->upload('my_picture.jpg', ['public_id' => 'sample_remote']);

$cloudinary->image('sample_remote.jpg');

# http://res.cloudinary.com/demo/image/upload/sample_remote.jpg

imageTag

Returns an html image tag pointing to Cloudinary.

Usage:

$cloudinary->imageTag('sample.png')->fill(100, 100);

# <img src='http://res.cloudinary.com/cloud_name/image/upload/c_fill,h_100,w_100/sample.png'/>

uploadTag

Returns an HTML input field for direct image upload, to be used in conjunction with cloudinary_js package. It integrates jQuery-File-Upload widget and provides all the necessary parameters for a direct upload.

Usage:

$cloudinary->tag->uploadTag('image', $cloudinary->configuration);

** See our documentation for plenty more options of uploading directly from the browser**.

Additional resources

Additional resources are available at:

Support

You can open an issue through GitHub.

Stay tuned for updates, tips and tutorials: Blog , Twitter, Facebook.

Join the Community

Impact the product, hear updates, test drive new features and more! Join here.

Contributing

Running Tests

Run all tests:

./vendor/bin/robo test

Run only unit tests:

./vendor/bin/robo test:unit

Run only integration tests:

./vendor/bin/robo test:integration

Test Options

All test commands also accept options such as ./vendor/bin/robo test:unit --coverage to generate test coverage reports and ./vendor/bin/robo test:unit --dox to output an agile documentation from the tests.

License

Released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].