Link
Skip to main content

Running JDeli in Kotlin

Table of contents

  1. Introduction
  2. Prerequisites
  3. Code Example

Introduction

The following tutorial shows you how to use JDeli in Kotlin.

Prerequisites

Code Example

This code snippet uses JPG to PNG conversion as an example. This example uses Gradle as the build tool.

package org.example

import com.idrsolutions.image.JDeli
import java.awt.image.BufferedImage
import java.io.File

fun main() {
    val bufferedImage: BufferedImage = JDeli.read(File("jpgFile.jpg"))
    JDeli.write(bufferedImage, "png", File("pngFile.png"))
}

Why JDeli?

  • Support image formats such as AVIF, HEIC and JPEG XL (AVIF soon) that are not supported in Java.
  • Process images up to 3x faster than ImageIO and alternative Java image libraries.
  • Prevent JVM crashes caused by native code in other image libraries such as ImageIO.
  • Handle JPEG, PNG, TIFF image file formats fully in Java.
  • Keep your Image files secure as JDeli makes no calls to any external system or third party library.

Learn more about JDeli

Start Your Free Trial