Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 904 Bytes
import java.nio.channels.Channels
object KotlinRethumbFormatExample {
@JvmStatic fun main(args: Array<String>) {
// First apply a square operation, then convert to PNG format.
val paramOperation1 = "square"
val paramValue1 = 100
val paramOperation2 = "format"
val paramValue2 = "png" // Other formats available: jpg, gif, tiff and webp..
val imageURL = ""
val imageFilename = "resized-image.jpg"
val url = URL(String.format("", paramOperation1, paramValue1, paramOperation2, paramValue2, imageURL))
val fos = FileOutputStream(imageFilename), 0, java.lang.Long.MAX_VALUE)
You can’t perform that action at this time.