public final class IIOUtil extends Object
Modifier and Type | Method | 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 registry,
IIOServiceProvider provider,
Class<T> category) |
THIS METHOD WILL ME MOVED/RENAMED, DO NOT USE.
|
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 Rectangle |
getSourceRegion(IIOParam pParam,
int pSrcWidth,
int pSrcHeight) |
|
static <T> T |
lookupProviderByName(ServiceRegistry registry,
String providerClassName,
Class<T> category) |
THIS METHOD WILL ME MOVED/RENAMED, DO NOT USE.
|
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 <T> void deregisterProvider(ServiceRegistry registry, IIOServiceProvider provider, Class<T> category)
registry
- the registry to unregister from.provider
- the provider to unregister.category
- the category to unregister from.public static <T> T lookupProviderByName(ServiceRegistry registry, String providerClassName, Class<T> category)
registry
- the registry to lookup from.providerClassName
- name of the provider class.category
- provider categorynull
.public static String[] getNormalizedReaderFormatNames()
String
s.ImageIO.getReaderFormatNames()
public static String[] getNormalizedWriterFormatNames()
String
s.ImageIO.getWriterFormatNames()
Copyright © 2018. All rights reserved.