Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization
by Alejandro Terrazas, John Ostuni, Michael Barlow
Reading and Writing Basics
In the previous chapter we saw that with the Java2D package, input images are converted to Images using the getImage methods of the Applet class and the Toolkit class. In this chapter we'll see that, with the Image I/O package, input images are converted to BufferedImages using the read methods of the javax.imageio.ImageReader class. Generally, more than one ImageReader subclass will be available, so the initial step in reading an image is to choose an ImageReader that can decode the format of the image of interest. This is done by providing information about that image's format to a set of ImageReader service providers (javax.imageio.ImageReaderSpis). This information can be in the following forms:
Image file suffix ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access