Main page > Java > Image FAQ

How to read and write image files with Java

Next question: Example image code >>

There is code in the Java standard runtime library to do loading and saving, but the range of functionality depends heavily on the Java version that you are using. If you cannot assume any Java versions because your code is supposed to run even with older Java virtual machines, there is nothing but loading GIF and JPEG files.

In addition quite a few third-party libraries exist. I've assembled a list of libraries to read and write pixel and vector image files. If you find Java code to read or write images that is not linked on that page, please tell me!

Some additional hints for picking a library—trying each and every one of them seems to be a rather time-consuming task.

A note to readers who prefer German:

In der FAQ der deutschsprachigen Java-Newsgroup de.comp.lang.java gibt es auch einen Abschnitt zum Thema Laden und Speichern von Bildern (alternativ: http://www.faqs.org/faqs/de/comp-lang-java/faq/).