Chapter 5. Image I/O API

IN THIS CHAPTER

  • Image Formats

  • Reading and Writing Basics

  • Service Provider Interfaces

  • IIOParam Classes

  • Metadata

  • Final Plug-in Code

In Chapter 4, “Immediate Mode Imaging Model,” we looked at how an image gets loaded and what to do with it after it is loaded, but there wasn't much discussion regarding what types of images can be loaded. The reason for this is that until the Java Image I/O package was developed, you could only read GIF and JPEG images. Also, until this package was created, you could only write out unformatted pixel values. In this chapter, we'll explore the basics of the Java Image I/O package and how it solved both of these problems.

Two of the more useful aspects of the Image I/O package are its use of plug-ins and metadata. The capability to read and write formatted images is available through plug-ins, which means that at runtime the Java virtual machine (JVM) discovers which image readers/writers are available and what types of image formats they can decode/encode. Metadata is useful in communicating non-pixel information about the input images and output images. In the Image I/O package, the metadata classes are designed to be easily converted into XML DOM trees, enabling the use of the Java XML DOM API when working with this image information.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset