

Location and the creation date are currently supported. Preserving copyright information, the GPS You can request that specific metadata is copied from the uploaded image To an image type which does not support transparency (like JPEG). You must specify a background color if you wish to convert an image with a transparent background Only the colors white and black are supported as strings. Custom background color using the color's hex value: "#000000". The following options are availableĪ hex value. Include a background property to fill a transparent image's background. The transform object specifies the stylistic transformations that will be applied to your image. The wildcard "*/*" returns the smallest of Tinify's supported image types, currently WebP, JPEG and PNG. Smallest of the provided image types will be returned. Multiple image types, specified as an array. One image type, specified as a string "image/webp". The following options are available as a type: You can provide the following options to convert your image: convert Source converted = nvert( new Options().with( "type", "image/jpeg")).transform( new Options().with( "background", "#000000")) Source source = omFile( "panda-sticker.png") The background of a transparent image will be filled. Specify a background property in the transform object. If you wish to convert an image with a transparent background to one with a solid background, In case you want to include formats that do not support transparency (JPEG), one can specify a background color that replaces the transparency using the transform object. Images with a transparent background will only be converted to formats that support transparency. String extension = converted.extension() Ĭonverted.toFile( "panda-sticker." + extension) If you use Gradle instead, you can use the following: dependencies )).result() RELEASE with a specific version: com.tinify tinify RELEASE To avoidīreaking changes in your code when we update the client, replace You can use the Java client as a Maven dependencyīy adding the following to your application’s pom.xml. Languages make it very easy to interact with the Tinify API. The Tinify API allows you to compress and optimize WebP, JPEG and PNG images.
