How to add a drop shadow to an image in Java

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.Cloudmersive</groupId>
<artifactId>Cloudmersive.APIClient.Java</artifactId>
<version>v2.75</version>
</dependency>
</dependencies>
// Import classes://import com.cloudmersive.client.invoker.ApiClient;//import com.cloudmersive.client.invoker.ApiException;//import com.cloudmersive.client.invoker.Configuration;//import com.cloudmersive.client.invoker.auth.*;//import com.cloudmersive.client.EditApi;ApiClient defaultClient = Configuration.getDefaultApiClient();// Configure API key authorization: ApikeyApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");Apikey.setApiKey("YOUR API KEY");// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)//Apikey.setApiKeyPrefix("Token");EditApi apiInstance = new EditApi();Integer X = 56; // Integer | Horizontal (X) offset of the drop shadowInteger Y = 56; // Integer | Vertical (Y) offset of the drop shadowInteger sigma = 56; // Integer | Sigma (blur distance) of the drop shadowInteger opacity = 56; // Integer | Opacity of the drop shadow; 0 is 0% and 100 is 100%File imageFile = new File("/path/to/file"); // File | Image file to perform the operation on.  Common file formats such as PNG, JPEG are supported.try {byte[] result = apiInstance.editDropShadow(X, Y, sigma, opacity, imageFile);System.out.println(result);} catch (ApiException e) {System.err.println("Exception when calling EditApi#editDropShadow");e.printStackTrace();}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store