public final class IIOUtil extends Object
Modifier and Type | Method and Description |
---|---|
static InputStream |
createStreamAdapter(ImageInputStream pStream)
Creates an
InputStream adapter that reads from an underlying ImageInputStream . |
static InputStream |
createStreamAdapter(ImageInputStream pStream,
long pLength)
Creates an
InputStream adapter that reads from an underlying ImageInputStream . |
static OutputStream |
createStreamAdapter(ImageOutputStream pStream)
Creates an
OutputStream adapter that writes to an underlying ImageOutputStream . |
static <T> void |
deregisterProvider(ServiceRegistry pRegistry,
IIOServiceProvider pProvider,
Class<T> pCategory)
Deprecated.
|
static BufferedImage |
fakeAOI(BufferedImage pImage,
Rectangle pSourceRegion) |
static Image |
fakeSubsampling(Image pImage,
IIOParam pParam) |
static String[] |
getNormalizedReaderFormatNames()
Returns a sorted array of format names, that can be read by ImageIO.
|
static String[] |
getNormalizedWriterFormatNames()
Returns a sorted array of format names, that can be written by ImageIO.
|
static ProviderInfo |
getProviderInfo(Class<? extends IIOServiceProvider> pProviderClass)
Creates a
ProviderInfo instance for the given service provider. |
static Rectangle |
getSourceRegion(IIOParam pParam,
int pSrcWidth,
int pSrcHeight) |
public static InputStream createStreamAdapter(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 InputStream createStreamAdapter(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 OutputStream createStreamAdapter(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 Rectangle getSourceRegion(IIOParam pParam, int pSrcWidth, int pSrcHeight)
public static BufferedImage fakeAOI(BufferedImage pImage, Rectangle pSourceRegion)
public static ProviderInfo getProviderInfo(Class<? extends IIOServiceProvider> pProviderClass)
ProviderInfo
instance for the given service provider.pProviderClass
- the provider class to get info for.ProviderInfo
.public static <T> void deregisterProvider(ServiceRegistry pRegistry, IIOServiceProvider pProvider, Class<T> pCategory)
pRegistry
- the registry to unregister frompProvider
- the provider to unregisterpCategory
- the category to unregister frompublic static String[] getNormalizedReaderFormatNames()
String
s.ImageIO.getReaderFormatNames()
public static String[] getNormalizedWriterFormatNames()
String
s.ImageIO.getWriterFormatNames()
Copyright © 2017. All rights reserved.