Package org.ngengine.stbimage
Class HdrDecoder
java.lang.Object
org.ngengine.stbimage.HdrDecoder
- All Implemented Interfaces:
StbDecoder
Radiance HDR decoder, RGBE to float conversion.
-
Constructor Summary
ConstructorsConstructorDescriptionHdrDecoder(ByteBuffer buffer, IntFunction<ByteBuffer> allocator, boolean flipVertically) Creates an HDR 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 booleanisHdr(ByteBuffer buffer) Tests if the source starts with a Radiance HDR signature.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
-
HdrDecoder
Creates an HDR decoder instance.- Parameters:
buffer- source dataallocator- output allocatorflipVertically- true to vertically flip decoded output
-
-
Method Details
-
isHdr
Tests if the source starts with a Radiance HDR signature.- Parameters:
buffer- source bytes- Returns:
- true if HDR signature is present
-
info
Reads image metadata without fully decoding pixel data.- Specified by:
infoin interfaceStbDecoder- Returns:
- image information
-
getAllocator
Returns the allocator used by this decoder for output buffers.- Specified by:
getAllocatorin interfaceStbDecoder- Returns:
- allocator function
-
load
Decodes image pixels.- Specified by:
loadin interfaceStbDecoder- Parameters:
desiredChannels- requested output channels (0 keeps source/default behavior)- Returns:
- decoded image result
-