Package org.ngengine.stbimage
Class PsdDecoder
java.lang.Object
org.ngengine.stbimage.PsdDecoder
- All Implemented Interfaces:
StbDecoder
PSD decoder for composited RGB view, 8/16-bit.
-
Constructor Summary
ConstructorsConstructorDescriptionPsdDecoder(ByteBuffer buffer, IntFunction<ByteBuffer> allocator, boolean flipVertically) Creates a PSD 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 booleanisPsd(ByteBuffer buffer) Tests whether the source starts with a valid PSD signature/version.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
-
PsdDecoder
Creates a PSD decoder instance.- Parameters:
buffer- source dataallocator- output allocatorflipVertically- true to vertically flip decoded output
-
-
Method Details
-
isPsd
Tests whether the source starts with a valid PSD signature/version.- Parameters:
buffer- source bytes- Returns:
- true when file header matches PSD
-
getAllocator
Returns the allocator used by this decoder for output buffers.- Specified by:
getAllocatorin interfaceStbDecoder- Returns:
- allocator function
-
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
-