Package org.ngengine.stbimage
Class PicDecoder
java.lang.Object
org.ngengine.stbimage.PicDecoder
- All Implemented Interfaces:
StbDecoder
Softimage PIC decoder.
-
Constructor Summary
ConstructorsConstructorDescriptionPicDecoder(ByteBuffer buffer, IntFunction<ByteBuffer> allocator, boolean flipVertically) Creates a PIC decoder instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the allocator used by this decoder for output buffers.info()Reads image metadata without fully decoding pixel data.static booleanisPic(ByteBuffer buffer) Tests whether the source starts with Softimage PIC magic values.load(int desiredChannels) Decodes image pixels.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ngengine.stbimage.StbDecoder
load16, loadAllFrames, loadf, loadNextFrame
-
Constructor Details
-
PicDecoder
Creates a PIC decoder instance.- Parameters:
buffer- source dataallocator- output allocatorflipVertically- true to vertically flip decoded output
-
-
Method Details
-
isPic
Tests whether the source starts with Softimage PIC magic values.- Parameters:
buffer- source bytes- Returns:
- true when signature and tag match PIC
-
info
Reads image metadata without fully decoding pixel data.- Specified by:
infoin interfaceStbDecoder- Returns:
- image information
-
load
Decodes image pixels.- Specified by:
loadin interfaceStbDecoder- Parameters:
desiredChannels- requested output channels (0 keeps source/default behavior)- Returns:
- decoded image result
-
getAllocator
Returns the allocator used by this decoder for output buffers.- Specified by:
getAllocatorin interfaceStbDecoder- Returns:
- allocator function
-