Home » Desktop Java » imageio

imageio

Determine format of an image

With this tutorial we are going to see how to determine the format of an image in a Java Desktop Application. You will find this particularly useful in applications that need to process large numbers of images. Additionally you can use these for input verification. In short, to determine the format of an image all you have to do is: ...

Read More »

List read/write supported image formats

This is an example on how to list read/write image formats in a Java Desktop applications. You can find this very useful when you want to create “Help” tooltip list with all the supported image files to inform the user. You can also use it for input validation. Basically, in order to list read/write image formats, you should: Create a ...

Read More »

Read image from file

In this tutorial we are going to see how to read an image from a file. This is very useful when you want to store image files in your system and you want to use them to enrich the graphics of your application. In order to read image from a file: You have to open a new File in the ...

Read More »

Create image file from graphics object

With this tutorial we shall show you how to create an image file from graphics object. This is particularly useful when you want to create your own images out of custom made graphics. Creating an image file from graphics object requires that you: Create a new BufferedImage. Create a Graphics2D using createGraphics. Create a new File("myimage.png"). Use ImageIO.write(bufferedImage, "jpg", file) ...

Read More »

Compress a JPEG file

With this example we are going to learn how to compress a JPEG file. When saving space is important for your system, you have to consider compressing your images using JPEG format. This format compresses the image but its high quality can be preserved. In order to compress a JPEG file all you have to do is: Open a new ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns