Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Image processing in Java

51 sec read

image formats java

In this article I will introduce you to Java Image processing, explain why Java is a good fit and introduce our JDeli image processing library.

What is Image processing?

Image processing is the action of altering an image using an algorithm. Often this involves a kernel matrix. Image processing operations are frequently used to improve picture quality or expose details as well as just for fun.

Why use Java for Image processing?

Reason 1 ImageIO, plugins and third-party libraries such as JDeli allow Java to read and write a very wide range of Image file formats
Reason 2 Java provides a simple abstract BufferedImage class but also deep level access to pixels, rasters, colorspaces if needed
Reason 3 Graphics2D, kernels and Affine TranformOp allow a very wide range of operations to be applied to an Image.
Reason 4 Java is cross-platform, robust and well supported

Why use JDeli for Java Image processing?

JDeli simplifies image processing in Java and offers the following benefits:

  • prevent heap related JVM crashes
  • large selection of predefined Image processing operations
  • custom() operation makes it easy to define new operations
  • support for additional image formats such as Heic
  • reduce output file size
  • improve read/write performance
  • create smaller files
  • control over output
  • support threading
  • superior image scaling algorithms

Are there any other tutorials showing how to use JDeli to process images?



Are you a Java Developer working with Image files?

// Read an image
BufferedImage bufferedImage = JDeli.read(dicomImageFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(heicImageFile);

// Write an image
JDeli.write(bufferedImage, "heic", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(jpegImageFile);

// Write an image
JDeli.write(bufferedImage, "jpeg", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(jpeg2000ImageFile);

// Write an image
JDeli.write(bufferedImage, "jpx", outputStreamOrFile);
// Write an image
JDeli.write(bufferedImage, "pdf", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(pngImageFile);

// Write an image
JDeli.write(bufferedImage, "png", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(tiffImageFile);

// Write an image
JDeli.write(bufferedImage, "tiff", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(webpImageFile);

// Write an image
JDeli.write(bufferedImage, "webp", outputStreamOrFile);
Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

What is JBIG2?

JBIG2 is a lossless and lossy compression standard for bi-level images like scanned documents, offering high compression ratios by identifying and encoding similar shapes...
chika
47 sec read