Skip to content

Commit 506d17e

Browse files
authored
Update README.md
2 parents ee33566 + 8d58527 commit 506d17e

File tree

1 file changed

+61
-137
lines changed

1 file changed

+61
-137
lines changed

README.md

Lines changed: 61 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
[![Build Status](https://travis-ci.org/cloudinary/cloudinary_java.svg?branch=master)](https://travis-ci.org/cloudinary/cloudinary_java)
2-
[![Maven Central](https://img.shields.io/maven-central/v/com.cloudinary/cloudinary-core.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3Acom.cloudinary)
3-
[![license](https://img.shields.io/github/license/cloudinary/cloudinary_js.svg?maxAge=2592000)]()
42

53
Cloudinary
64
==========
75

8-
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
6+
## About
7+
The Cloudinary Java SDK allows you to quickly and easily integrate your application with Cloudinary.
8+
Effortlessly optimize and transform your cloud's assets.
99

10-
Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software.
11-
Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements.
12-
Images are seamlessly delivered through a fast CDN, and much much more.
10+
### Additional documentation
11+
This Readme provides basic installation and usage information.
12+
For the complete documentation, see the [Java SDK Guide](https://cloudinary.com/documentation/java_integration).
1313

14-
Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.
14+
## Table of Contents
15+
- [Key Features](#key-features)
16+
- [Version Support](#Version-Support)
17+
- [Installation](#installation)
18+
- [Usage](#usage)
19+
- [Setup](#Setup)
20+
- [Transform and Optimize Assets](#Transform-and-Optimize-Assets)
21+
- [File upload](#File-upload)
1522

23+
## Key Features
24+
- [Transform](https://cloudinary.com/documentation/java_video_manipulation) and [optimize](https://cloudinary.com/documentation/java_image_manipulation#image_optimizations) assets (links to docs).
25+
- [Upload assets to cloud](https://cloudinary.com/documentation/java_image_and_video_upload)
1626

17-
Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.
27+
## Version Support
28+
| SDK Version | Java 6+ |
29+
|----------------|---------|
30+
| 1.1.0 - 1.29.0 | V |
1831

19-
For Java, Cloudinary provides a library for simplifying the integration even further.
20-
21-
**Notes:**
22-
23-
* There are three flavors of the library to support different HttpClient versions: cloudinary-http42, cloudinary-http43 and cloudinary-http44.
24-
* For Android there's a separate library available at https://github.com/cloudinary/cloudinary_android
25-
26-
## Getting started guide
27-
![](https://res.cloudinary.com/cloudinary/image/upload/see_more_bullet.png) **Take a look at our [Getting started guide for Java](https://cloudinary.com/documentation/java_integration#getting_started_guide)**.
28-
29-
## Setup ######################################################################
30-
31-
The cloudinary_java library is available in [Maven Central](https://repo1.maven.org/maven2/com/cloudinary/). To use it, add the following dependency to your pom.xml :
32+
## Installation
33+
The cloudinary_java library is available in [Maven Central](https://mvnrepository.com/artifact/com.cloudinary/cloudinary-core). To use it, add the following dependency to your pom.xml :
3234

3335
```xml
3436
<dependency>
@@ -41,52 +43,17 @@ The cloudinary_java library is available in [Maven Central](https://repo1.maven.
4143
Alternatively, download cloudinary_java from [here](https://repo1.maven.org/maven2/com/cloudinary/cloudinary-core/1.29.0/cloudinary-core-1.29.0.jar) and [here](https://repo1.maven.org/maven2/com/cloudinary/cloudinary-http44/1.29.0/cloudinary-http44-1.29.0.jar)
4244
and see [build.gradle](https://github.com/cloudinary/cloudinary_java/blob/master/cloudinary-http44/build.gradle) for library dependencies.
4345

44-
## Try it right away
45-
46-
Sign up for a [free account](https://cloudinary.com/users/register/free) so you can try out image transformations and seamless image delivery through CDN.
47-
48-
*Note: Replace `demo` in all the following examples with your Cloudinary's `cloud name`.*
49-
50-
Accessing an uploaded image with the `sample` public ID through a CDN:
51-
52-
http://res.cloudinary.com/demo/image/upload/sample.jpg
53-
54-
![Sample](https://res.cloudinary.com/demo/image/upload/w_0.4/sample.jpg "Sample")
55-
56-
Generating a 150x100 version of the `sample` image and downloading it through a CDN:
57-
58-
http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill/sample.jpg
59-
60-
![Sample 150x100](https://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill/sample.jpg "Sample 150x100")
61-
62-
Converting to a 150x100 PNG with rounded corners of 20 pixels:
63-
64-
http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill,r_20/sample.png
65-
66-
![Sample 150x150 Rounded PNG](https://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill,r_20/sample.png "Sample 150x150 Rounded PNG")
67-
68-
For plenty more transformation options, see our [image transformations documentation](http://cloudinary.com/documentation/image_transformations).
69-
70-
Generating a 120x90 thumbnail based on automatic face detection of the Facebook profile picture of Bill Clinton:
71-
72-
http://res.cloudinary.com/demo/image/facebook/c_thumb,g_face,h_90,w_120/billclinton.jpg
73-
74-
![Facebook 90x120](https://res.cloudinary.com/demo/image/facebook/c_thumb,g_face,h_90,w_120/billclinton.jpg "Facebook 90x200")
75-
76-
For more details, see our documentation for embedding [Facebook](https://cloudinary.com/documentation/facebook_profile_pictures) and [Twitter](https://cloudinary.com/documentation/twitter_profile_pictures) profile pictures.
77-
7846
## Usage
47+
### Setup
7948

80-
### Configuration
81-
82-
Each request for building a URL of a remote cloud resource must have the `cloud_name` parameter set.
83-
Each request to our secure APIs (e.g., image uploads, eager sprite generation) must have the `api_key` and `api_secret` parameters set.
49+
Each request for building a URL of a remote cloud resource must have the `cloud_name` parameter set.
50+
Each request to our secure APIs (e.g., image uploads, eager sprite generation) must have the `api_key` and `api_secret` parameters set.
8451
See [API, URLs and access identifiers](https://cloudinary.com/documentation/solution_overview#account_and_api_setup) for more details.
8552

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

89-
The entry point of the library is the Cloudinary object.
56+
The entry point of the library is the Cloudinary object.
9057
```java
9158
Cloudinary cloudinary = new Cloudinary();
9259
```
@@ -105,8 +72,8 @@ Another example of setting the configuration parameters by providing the CLOUDIN
10572

10673
Cloudinary cloudinary = new Cloudinary("cloudinary://123456789012345:abcdeghijklmnopqrstuvwxyz12@n07t21i7");
10774

108-
### Embedding and transforming images
109-
75+
### Transform and Optimize Assets
76+
- [See full documentation](https://cloudinary.com/documentation/java_image_manipulation)
11077
Any image uploaded to Cloudinary can be transformed and embedded using powerful view helper methods:
11178

11279
The following example generates the url for accessing an uploaded `sample` image while transforming it to fill a 100x150 rectangle:
@@ -115,38 +82,29 @@ The following example generates the url for accessing an uploaded `sample` image
11582
cloudinary.url().transformation(new Transformation().width(100).height(150).crop("fill")).generate("sample.jpg");
11683
```
11784

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

12087
```java
12188
cloudinary.url().transformation(new Transformation().width(90).height(90).crop("thumb").gravity("face")).generate("woman.jpg");
12289
```
12390

124-
You can provide either a Facebook name or a numeric ID of a Facebook profile or a fan page.
125-
91+
You can provide either a Facebook name or a numeric ID of a Facebook profile or a fan page.
92+
12693
Embedding a Facebook profile to match your graphic design is very simple:
12794

12895
```java
12996
cloudinary.url().type("facebook").transformation(new Transformation().width(130).height(130).crop("fill").gravity("north_west")).generate("billclinton.jpg");
13097
```
13198

132-
Same goes for Twitter:
133-
134-
```java
135-
cloudinary.url().type("twitter_name").generate("billclinton.jpg");
136-
```
137-
138-
![](https://res.cloudinary.com/cloudinary/image/upload/see_more_bullet.png) **See [our documentation](https://cloudinary.com/documentation/java_image_manipulation) for more information about displaying and transforming images in Java**.
139-
140-
### Upload
141-
99+
### File upload
142100
Assuming you have your Cloudinary configuration parameters defined (`cloud_name`, `api_key`, `api_secret`), uploading to Cloudinary is very simple.
143-
144-
The following example uploads a local JPG to the cloud:
101+
102+
The following example uploads a local JPG to the cloud:
145103

146104
```java
147105
cloudinary.uploader().upload("my_picture.jpg", ObjectUtils.emptyMap());
148106
```
149-
107+
150108
The uploaded image is assigned a randomly generated public ID. The image is immediately available for download through a CDN:
151109

152110
```java
@@ -155,7 +113,7 @@ cloudinary.url().generate("abcfrmo8zul1mafopawefg.jpg");
155113
# http://res.cloudinary.com/demo/image/upload/abcfrmo8zul1mafopawefg.jpg
156114
```
157115

158-
You can also specify your own public ID:
116+
You can also specify your own public ID:
159117

160118
```java
161119
cloudinary.uploader().upload("http://www.example.com/image.jpg", ObjectUtils.asMap("public_id", "sample_remote"));
@@ -165,60 +123,26 @@ cloudinary.url().generate("sample_remote.jpg");
165123
# http://res.cloudinary.com/demo/image/upload/sample_remote.jpg
166124
```
167125

168-
![](https://res.cloudinary.com/cloudinary/image/upload/see_more_bullet.png) **See [our documentation](https://cloudinary.com/documentation/java_image_upload) for plenty more options of uploading to the cloud from your Java code**.
169-
170-
### imageTag
171-
172-
Returns an html image tag pointing to Cloudinary.
173-
174-
Usage:
175-
176-
```java
177-
cloudinary.url().format("png").transformation(new Transformation().width(100).height(100).crop("fill")).imageTag("sample");
178-
179-
# <img src='http://res.cloudinary.com/cloud_name/image/upload/c_fill,h_100,w_100/sample.png' height='100' width='100'/>
180-
```
181-
182-
### imageUploadTag
183-
184-
Returns an html input field for direct image upload, to be used in conjunction with [cloudinary\_js package](https://github.com/cloudinary/cloudinary_js/). It integrates [jQuery-File-Upload widget](https://github.com/blueimp/jQuery-File-Upload) and provides all the necessary parameters for a direct upload.
185-
186-
Usage:
187-
188-
```java
189-
Map options = ObjectUtils.asMap("resource_type", "auto");
190-
Map htmlOptions = ObjectUtils.asMap("alt", "sample");
191-
String html = cloudinary.uploader().imageUploadTag("image_id", options, htmlOptions);
192-
```
193-
194-
![](https://res.cloudinary.com/cloudinary/image/upload/see_more_bullet.png) **See [our documentation](https://cloudinary.com/documentation/java_image_upload#direct_uploading_from_the_browser) for plenty more options of uploading directly from the browser**.
195-
196-
## Additional resources ##########################################################
197-
198-
Additional resources are available at:
199-
200-
* [Website](https://cloudinary.com)
201-
* [Interactive demo](https://demo.cloudinary.com/default)
202-
* [Knowledge Base](https://support.cloudinary.com/hc/en-us)
203-
* [Documentation](https://cloudinary.com/documentation)
204-
* [Documentation for Java integration](https://cloudinary.com/documentation/java_integration)
205-
* [Image transformations documentation](https://cloudinary.com/documentation/image_transformations)
206-
* [Upload API documentation](https://cloudinary.com/documentation/upload_images)
207-
208-
## Support
209-
210-
You can [open an issue through GitHub](https://github.com/cloudinary/cloudinary_java/issues).
211-
212-
Contact us [https://cloudinary.com/contact](https://cloudinary.com/contact)
213-
214-
Stay tuned for updates, tips and tutorials: [Blog](https://cloudinary.com/blog), [Twitter](https://twitter.com/cloudinary), [Facebook](https://www.facebook.com/Cloudinary).
215-
216-
## Join the Community ##########################################################
217-
218-
Impact the product, hear updates, test drive new features and more! Join [here](https://www.facebook.com/groups/CloudinaryCommunity).
219-
220-
221-
## License #######################################################################
222-
223-
Released under the MIT license.
224-
126+
## Contributions
127+
See [contributing guidelines](/CONTRIBUTING.md).
128+
129+
## Get Help
130+
- [Open a Github issue](https://github.com/CloudinaryLtd/cloudinary_java/issues) (for issues related to the SDK)
131+
- [Open a support ticket](https://cloudinary.com/contact) (for issues related to your account)
132+
133+
## About Cloudinary
134+
Cloudinary is a powerful media API for websites and mobile apps alike, Cloudinary enables developers to efficiently manage, transform, optimize, and deliver images and videos through multiple CDNs. Ultimately, viewers enjoy responsive and personalized visual-media experiences—irrespective of the viewing device.
135+
136+
## Additional Resources
137+
- [Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs.
138+
- [MediaJams.dev](https://mediajams.dev/): Bite-size use-case tutorials written by and for Cloudinary Developers
139+
- [DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube.
140+
- [Cloudinary Academy](https://training.cloudinary.com/): Free self-paced courses, instructor-led virtual courses, and on-site courses.
141+
- [Code Explorers and Feature Demos](https://cloudinary.com/documentation/code_explorers_demos_index): A one-stop shop for all code explorers, Postman collections, and feature demos found in the docs.
142+
- [Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next.
143+
- [Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers.
144+
- [Cloudinary Account Registration](https://cloudinary.com/users/register/free): Free Cloudinary account registration.
145+
- [Cloudinary Website](https://cloudinary.com)
146+
147+
## Licence
148+
Released under the MIT license.

0 commit comments

Comments
 (0)