Site iconJava PDF Blog

How does Java handle different Images and ColorSpaces – Part 1

Java icon

One of the attractions of Java is the way it abstracts and simplifies many programming constructs. In place of Tiffs, PNGs, JPEGs and other Image formats, you get a simple BufferedImage object. ImageIO and other third-party libraries such as our own JDeli image library provide methods to read and write a BufferedImage.

We have spent a lot of time working with different images formats in the process of writing the JDeli Image library as a replacement for  ImageIO and the aim of this series is to share that knowledge to a wider audience.

Java makes images simple to use. You can work with a BufferedImage and just load or save this to any supported image file format. A BufferedImage includes lots of functionality which allows you to render and process the image, with all the complexity and implementation hidden by Java. A BufferedImage can even be used as a Graphics2D canvas which can be drawn on. Here is some example code.


While Java removes a lot of Image complexity, it is worth understanding in more detail how images work. In this series of articles, we will be diving deep into how BufferedImage provides this abstraction, how different types of images work and how you can access the low-level Image data.

See you next time when we will look at ColorSpaces.