All Projects → cloudinary → Cloudinary_java

cloudinary / Cloudinary_java

Licence: mit
Cloudinary Java Client Library

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Cloudinary java

Popbot
Color splash effects using Deep Learning
Stars: ✭ 61 (-53.44%)
Mutual labels:  image-manipulation
Panoramic Image Stitching Using Invariant Features
Given a number of input images, concatenate all images to produce a panoramic image using invariant features.
Stars: ✭ 81 (-38.17%)
Mutual labels:  image-manipulation
Zebra image
A compact (one-file only) and lightweight PHP library for image manipulation providing methods for performing several types of image manipulation operations and applying filters to images
Stars: ✭ 108 (-17.56%)
Mutual labels:  image-manipulation
Pix2pix
Image-to-image translation with conditional adversarial nets
Stars: ✭ 8,765 (+6590.84%)
Mutual labels:  image-manipulation
Cloudinary Vue
Cloudinary components library for Vue.js application, for image and video optimization.
Stars: ✭ 76 (-41.98%)
Mutual labels:  image-manipulation
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (-25.95%)
Mutual labels:  image-manipulation
Realismcnn
code for predicting and improving visual realism in composite images
Stars: ✭ 53 (-59.54%)
Mutual labels:  image-manipulation
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+8245.8%)
Mutual labels:  image-manipulation
Svelte Easy Crop
A Svelte component to crop images with easy interactions
Stars: ✭ 80 (-38.93%)
Mutual labels:  image-manipulation
Neural Doodle
Turn your two-bit doodles into fine artworks with deep neural networks, generate seamless textures from photos, transfer style from one image to another, perform example-based upscaling, but wait... there's more! (An implementation of Semantic Style Transfer.)
Stars: ✭ 9,680 (+7289.31%)
Mutual labels:  image-manipulation
Merge Images
Easily compose images together without messing around with canvas
Stars: ✭ 1,172 (+794.66%)
Mutual labels:  image-manipulation
Pixelsorter
Pixel sorting tool for Python
Stars: ✭ 73 (-44.27%)
Mutual labels:  image-manipulation
Exprgan
Facial Expression Editing with Controllable Expression Intensity
Stars: ✭ 98 (-25.19%)
Mutual labels:  image-manipulation
Dna Gan
DNA-GAN: Learning Disentangled Representations from Multi-Attribute Images
Stars: ✭ 65 (-50.38%)
Mutual labels:  image-manipulation
L1stabilizer
🎥 Video stabilization using L1-norm optimal camera paths.
Stars: ✭ 111 (-15.27%)
Mutual labels:  image-manipulation
React Easy Crop
A React component to crop images/videos with easy interactions
Stars: ✭ 1,093 (+734.35%)
Mutual labels:  image-manipulation
Canvacord
Powerful image manipulation tool to manipulate images easily.
Stars: ✭ 87 (-33.59%)
Mutual labels:  image-manipulation
Bitmap
C++ Bitmap Library
Stars: ✭ 125 (-4.58%)
Mutual labels:  image-manipulation
Mgan
Masking GAN - Image attribute mask generation
Stars: ✭ 120 (-8.4%)
Mutual labels:  image-manipulation
Glitch This
📷 Glitchify images and GIF - with highly customizable options!
Stars: ✭ 1,396 (+965.65%)
Mutual labels:  image-manipulation

Build Status Maven Central license

Cloudinary

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 Java, Cloudinary provides a library for simplifying the integration even further.

Notes:

  • There are three flavors of the library to support different HttpClient versions: cloudinary-http42, cloudinary-http43 and cloudinary-http44.
  • For Android there's a separate library available at https://github.com/cloudinary/cloudinary_android

Getting started guide

Take a look at our Getting started guide for Java.

Setup

The cloudinary_java library is available in Maven Central. To use it, add the following dependency to your pom.xml :

<dependency>
    <groupId>com.cloudinary</groupId>
    <artifactId>cloudinary-http44</artifactId>
    <version>1.29.0</version>
</dependency>

Alternatively, download cloudinary_java from here and here and see build.gradle for library dependencies.

Try it right away

Sign up for a free account so you can try out image transformations and seamless image delivery through CDN.

Note: Replace demo in all the following examples with your Cloudinary's cloud name.

Accessing an uploaded image with the sample public ID through a CDN:

http://res.cloudinary.com/demo/image/upload/sample.jpg

Sample

Generating a 150x100 version of the sample image and downloading it through a CDN:

http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill/sample.jpg

Sample 150x100

Converting to a 150x100 PNG with rounded corners of 20 pixels:

http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill,r_20/sample.png

Sample 150x150 Rounded PNG

For plenty more transformation options, see our image transformations documentation.

Generating a 120x90 thumbnail based on automatic face detection of the Facebook profile picture of Bill Clinton:

http://res.cloudinary.com/demo/image/facebook/c_thumb,g_face,h_90,w_120/billclinton.jpg

Facebook 90x120

For more details, see our documentation for embedding Facebook and Twitter profile pictures.

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 cloudinary = new Cloudinary();

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

Map config = new HashMap();
config.put("cloud_name", "n07t21i7");
config.put("api_key", "123456789012345");
config.put("api_secret", "abcdeghijklmnopqrstuvwxyz12");
Cloudinary cloudinary = new Cloudinary(config);

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

Cloudinary 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.url().transformation(new Transformation().width(100).height(150).crop("fill")).generate("sample.jpg");

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

cloudinary.url().transformation(new Transformation().width(90).height(90).crop("thumb").gravity("face")).generate("woman.jpg");

You can provide either a Facebook name or a numeric ID of a Facebook profile or a fan page.

Embedding a Facebook profile to match your graphic design is very simple:

cloudinary.url().type("facebook").transformation(new Transformation().width(130).height(130).crop("fill").gravity("north_west")).generate("billclinton.jpg");

Same goes for Twitter:

cloudinary.url().type("twitter_name").generate("billclinton.jpg");

See our documentation for more information about displaying and transforming images in Java.

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.uploader().upload("my_picture.jpg", ObjectUtils.emptyMap());

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

cloudinary.url().generate("abcfrmo8zul1mafopawefg.jpg");

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

You can also specify your own public ID:

cloudinary.uploader().upload("http://www.example.com/image.jpg", ObjectUtils.asMap("public_id", "sample_remote"));

cloudinary.url().generate("sample_remote.jpg");

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

See our documentation for plenty more options of uploading to the cloud from your Java code.

imageTag

Returns an html image tag pointing to Cloudinary.

Usage:

cloudinary.url().format("png").transformation(new Transformation().width(100).height(100).crop("fill")).imageTag("sample");

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

imageUploadTag

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:

Map options = ObjectUtils.asMap("resource_type", "auto");
Map htmlOptions = ObjectUtils.asMap("alt", "sample");
String html = cloudinary.uploader().imageUploadTag("image_id", options, htmlOptions);

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.

Contact us https://cloudinary.com/contact

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.

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].