public final class IIOUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.io.InputStream |
createStreamAdapter(javax.imageio.stream.ImageInputStream pStream)
Creates an
InputStream adapter that reads from an underlying ImageInputStream. |
static java.io.InputStream |
createStreamAdapter(javax.imageio.stream.ImageInputStream pStream,
long pLength)
Creates an
InputStream adapter that reads from an underlying ImageInputStream. |
static java.io.OutputStream |
createStreamAdapter(javax.imageio.stream.ImageOutputStream pStream)
Creates an
OutputStream adapter that writes to an underlying ImageOutputStream. |
static <T> void |
deregisterProvider(javax.imageio.spi.ServiceRegistry pRegistry,
javax.imageio.spi.IIOServiceProvider pProvider,
java.lang.Class<T> pCategory)
Deprecated.
|
static java.awt.image.BufferedImage |
fakeAOI(java.awt.image.BufferedImage pImage,
java.awt.Rectangle pSourceRegion) |
static java.awt.Image |
fakeSubsampling(java.awt.Image pImage,
javax.imageio.IIOParam pParam) |
static java.lang.String[] |
getNormalizedReaderFormatNames()
Returns a sorted array of format names, that can be read by ImageIO.
|
static java.lang.String[] |
getNormalizedWriterFormatNames()
Returns a sorted array of format names, that can be written by ImageIO.
|
static ProviderInfo |
getProviderInfo(java.lang.Class<? extends javax.imageio.spi.IIOServiceProvider> pProviderClass)
Creates a
ProviderInfo instance for the given service provider. |
static java.awt.Rectangle |
getSourceRegion(javax.imageio.IIOParam pParam,
int pSrcWidth,
int pSrcHeight) |
public static java.io.InputStream createStreamAdapter(javax.imageio.stream.ImageInputStream pStream)
InputStream adapter that reads from an underlying ImageInputStream.
The input stream will read until the end of pStream.pStream - the stream to read from.InputStream reading from pStream.public static java.io.InputStream createStreamAdapter(javax.imageio.stream.ImageInputStream pStream,
long pLength)
InputStream adapter that reads from an underlying ImageInputStream.
The input stream will read until the end of pStream, or at most pLength bytes has been read.pStream - the stream to read from.pLength - the maximum number of bytes that can be read from pStream.InputStream reading from pStream.public static java.io.OutputStream createStreamAdapter(javax.imageio.stream.ImageOutputStream pStream)
OutputStream adapter that writes to an underlying ImageOutputStream.
Note: The adapter is buffered, and MUST be properly flushed/closed after use, otherwise data may be lost.
pStream - the stream to write to.OutputSteam writing to pStream.public static java.awt.Image fakeSubsampling(java.awt.Image pImage,
javax.imageio.IIOParam pParam)
public static java.awt.Rectangle getSourceRegion(javax.imageio.IIOParam pParam,
int pSrcWidth,
int pSrcHeight)
public static java.awt.image.BufferedImage fakeAOI(java.awt.image.BufferedImage pImage,
java.awt.Rectangle pSourceRegion)
public static ProviderInfo getProviderInfo(java.lang.Class<? extends javax.imageio.spi.IIOServiceProvider> pProviderClass)
ProviderInfo instance for the given service provider.pProviderClass - the provider class to get info for.ProviderInfo.public static <T> void deregisterProvider(javax.imageio.spi.ServiceRegistry pRegistry,
javax.imageio.spi.IIOServiceProvider pProvider,
java.lang.Class<T> pCategory)
pRegistry - the registry to unregister frompProvider - the provider to unregisterpCategory - the category to unregister frompublic static java.lang.String[] getNormalizedReaderFormatNames()
Strings.ImageIO.getReaderFormatNames()public static java.lang.String[] getNormalizedWriterFormatNames()
Strings.ImageIO.getWriterFormatNames()