Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
com.cloudinary:cloudinary-core
Advanced tools
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline. 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. This Java library allows to easily integrate with Cloudinary in Java applications.
The Cloudinary Java SDK allows you to quickly and easily integrate your application with Cloudinary. Effortlessly optimize and transform your cloud's assets.
This Readme provides basic installation and usage information. For the complete documentation, see the Java SDK Guide.
SDK Version | Java 6+ |
---|---|
1.1.0 - 1.39.0 | V |
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-http45</artifactId>
<version>1.39.0</version>
</dependency>
Alternatively, download cloudinary_java from here and here and see build.gradle for library dependencies.
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:abcdeghijklmnopqrstuvwxyz12@n07t21i7");
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");
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
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.
Released under the MIT license.
FAQs
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline. 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. This Java library allows to easily integrate with Cloudinary in Java applications.
We found that com.cloudinary:cloudinary-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.