java.lang.Object
overrungl.stb.STBImage
STBImage relies on preview features of the Java platform:
STBImagerefers to one or more preview APIs:MemorySegment,SegmentAllocator.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
The STB image reader.
- Since:
 - 0.1.0
 - Author:
 - squid233
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intImage channelsstatic final intImage channelsstatic final intImage channelsstatic final intImage channelsstatic final intImage channels - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertIphonePngToRgb(boolean shouldConvert) static voidconvertIphonePngToRgbThread(boolean shouldConvert) static @Nullable Stringstatic voidfree(MemorySegmentPREVIEW retValFromLoad) static voidhdrToLdrGamma(float gamma) static voidhdrToLdrScale(float scale) static booleanstatic booleaninfoFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] comp) static booleaninfoFromFile(MemorySegmentPREVIEW f, int[] x, int[] y, int[] comp) static booleaninfoFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static booleaninfoFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] comp) static booleanstatic booleanis16BitFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user) static booleanstatic booleanstatic booleanis16BitFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer) static booleanstatic booleanisHdrFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user) static booleanstatic booleanisHdrFromMemory(MemorySegmentPREVIEW buffer) static booleanisHdrFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer) static voidldrToHdrGamma(float gamma) static voidldrToHdrScale(float scale) static MemorySegmentPREVIEWstatic MemorySegmentPREVIEWstatic MemorySegmentPREVIEWload16FromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWload16FromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWload16FromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWstatic MemorySegmentPREVIEWloadfFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadfFromFile(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadfFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadfFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadFromFile(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadFromFile16(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEWloadGifFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW delays, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW z, MemorySegmentPREVIEW comp, int reqComp) static MemorySegmentPREVIEWloadGifFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[][] delays, int[] x, int[] y, int[] z, int[] comp, int reqComp) static MemorySegmentPREVIEWstatic booleanninfo(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static booleanninfoFromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static booleanninfoFromFile(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static booleanninfoFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static booleannis16Bit(MemorySegmentPREVIEW filename) static booleanstatic booleannis16BitFromMemory(MemorySegmentPREVIEW buffer, int len) static booleannisHdr(MemorySegmentPREVIEW filename) static booleanstatic booleannisHdrFromMemory(MemorySegmentPREVIEW buffer, int len) static MemorySegmentPREVIEWnload(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnload16(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnload16FromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnload16FromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadf(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadfFromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadfFromFile(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadfFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadFromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadFromFile(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadFromFile16(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEWnloadGifFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW delays, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW z, MemorySegmentPREVIEW comp, int reqComp) static voidsetFlipVerticallyOnLoad(boolean shouldFlip) static voidsetFlipVerticallyOnLoadThread(boolean shouldFlip) static voidsetUnpremultiplyOnLoad(boolean shouldUnpremultiply) static voidsetUnpremultiplyOnLoadThread(boolean shouldUnpremultiply) static intzlibDecodeBuffer(MemorySegmentPREVIEW obuffer, int olen, MemorySegmentPREVIEW ibuffer, int ilen) static MemorySegmentPREVIEWzlibDecodeMalloc(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW outLen) static MemorySegmentPREVIEWzlibDecodeMallocGuesssize(MemorySegmentPREVIEW buffer, int len, int initialSize, MemorySegmentPREVIEW outLen) static MemorySegmentPREVIEWzlibDecodeMallocGuesssizeHeaderflag(MemorySegmentPREVIEW buffer, int len, int initialSize, MemorySegmentPREVIEW outLen, int parseHeader) static intzlibDecodeNoHeaderBuffer(MemorySegmentPREVIEW obuffer, int olen, MemorySegmentPREVIEW ibuffer, int ilen) static MemorySegmentPREVIEWzlibDecodeNoheaderMalloc(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW outLen)  
- 
Field Details
- 
DEFAULT
public static final int DEFAULTImage channels- See Also:
 
 - 
GREY
public static final int GREYImage channels- See Also:
 
 - 
GREY_ALPHA
public static final int GREY_ALPHAImage channels- See Also:
 
 - 
RGB
public static final int RGBImage channels- See Also:
 
 - 
RGB_ALPHA
public static final int RGB_ALPHAImage channels- See Also:
 
 
 - 
 - 
Method Details
- 
convertIphonePngToRgb
public static void convertIphonePngToRgb(boolean shouldConvert)  - 
convertIphonePngToRgbThread
public static void convertIphonePngToRgbThread(boolean shouldConvert)  - 
nfailureReason
 - 
failureReason
 - 
hdrToLdrGamma
public static void hdrToLdrGamma(float gamma)  - 
hdrToLdrScale
public static void hdrToLdrScale(float scale)  - 
free
 - 
ninfo
public static boolean ninfo(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp)  - 
info
 - 
ninfoFromCallbacks
public static boolean ninfoFromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp)  - 
infoFromCallbacks
public static boolean infoFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] comp)  - 
ninfoFromFile
public static boolean ninfoFromFile(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp)  - 
infoFromFile
 - 
ninfoFromMemory
public static boolean ninfoFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp)  - 
infoFromMemory
public static boolean infoFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp)  - 
infoFromMemory
public static boolean infoFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] comp)  - 
nis16Bit
 - 
is16Bit
 - 
nis16BitFromCallbacks
 - 
is16BitFromCallbacks
 - 
is16BitFromFile
 - 
nis16BitFromMemory
 - 
is16BitFromMemory
 - 
is16BitFromMemory
 - 
nisHdr
 - 
isHdr
 - 
nisHdrFromCallbacks
 - 
isHdrFromCallbacks
 - 
isHdrFromFile
 - 
nisHdrFromMemory
 - 
isHdrFromMemory
 - 
isHdrFromMemory
 - 
ldrToHdrGamma
public static void ldrToHdrGamma(float gamma)  - 
ldrToHdrScale
public static void ldrToHdrScale(float scale)  - 
nload
public static MemorySegmentPREVIEW nload(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
load
public static MemorySegmentPREVIEW load(String filename, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nload16
public static MemorySegmentPREVIEW nload16(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
load16
public static MemorySegmentPREVIEW load16(String filename, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nload16FromCallbacks
public static MemorySegmentPREVIEW nload16FromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
load16FromCallbacks
public static MemorySegmentPREVIEW load16FromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nload16FromMemory
public static MemorySegmentPREVIEW nload16FromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
load16FromMemory
public static MemorySegmentPREVIEW load16FromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
load16FromMemory
public static MemorySegmentPREVIEW load16FromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadFromCallbacks
public static MemorySegmentPREVIEW nloadFromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadFromCallbacks
public static MemorySegmentPREVIEW loadFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadFromFile
public static MemorySegmentPREVIEW nloadFromFile(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadFromFile
public static MemorySegmentPREVIEW loadFromFile(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadFromFile16
public static MemorySegmentPREVIEW nloadFromFile16(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadFromFile16
public static MemorySegmentPREVIEW loadFromFile16(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadFromMemory
public static MemorySegmentPREVIEW nloadFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadFromMemory
public static MemorySegmentPREVIEW loadFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadFromMemory
public static MemorySegmentPREVIEW loadFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadGifFromMemory
public static MemorySegmentPREVIEW nloadGifFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW delays, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW z, MemorySegmentPREVIEW comp, int reqComp)  - 
loadGifFromMemory
public static MemorySegmentPREVIEW loadGifFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW delays, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW z, MemorySegmentPREVIEW comp, int reqComp)  - 
loadGifFromMemory
public static MemorySegmentPREVIEW loadGifFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[][] delays, int[] x, int[] y, int[] z, int[] comp, int reqComp)  - 
nloadf
public static MemorySegmentPREVIEW nloadf(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadf
public static MemorySegmentPREVIEW loadf(String filename, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadfFromCallbacks
public static MemorySegmentPREVIEW nloadfFromCallbacks(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadfFromCallbacks
public static MemorySegmentPREVIEW loadfFromCallbacks(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadfFromFile
public static MemorySegmentPREVIEW nloadfFromFile(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadfFromFile
public static MemorySegmentPREVIEW loadfFromFile(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
nloadfFromMemory
public static MemorySegmentPREVIEW nloadfFromMemory(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadfFromMemory
public static MemorySegmentPREVIEW loadfFromMemory(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels)  - 
loadfFromMemory
public static MemorySegmentPREVIEW loadfFromMemory(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels)  - 
setFlipVerticallyOnLoad
public static void setFlipVerticallyOnLoad(boolean shouldFlip)  - 
setFlipVerticallyOnLoadThread
public static void setFlipVerticallyOnLoadThread(boolean shouldFlip)  - 
setUnpremultiplyOnLoad
public static void setUnpremultiplyOnLoad(boolean shouldUnpremultiply)  - 
setUnpremultiplyOnLoadThread
public static void setUnpremultiplyOnLoadThread(boolean shouldUnpremultiply)  - 
zlibDecodeBuffer
public static int zlibDecodeBuffer(MemorySegmentPREVIEW obuffer, int olen, MemorySegmentPREVIEW ibuffer, int ilen)  - 
zlibDecodeMalloc
public static MemorySegmentPREVIEW zlibDecodeMalloc(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW outLen)  - 
zlibDecodeMallocGuesssize
public static MemorySegmentPREVIEW zlibDecodeMallocGuesssize(MemorySegmentPREVIEW buffer, int len, int initialSize, MemorySegmentPREVIEW outLen)  - 
zlibDecodeMallocGuesssizeHeaderflag
public static MemorySegmentPREVIEW zlibDecodeMallocGuesssizeHeaderflag(MemorySegmentPREVIEW buffer, int len, int initialSize, MemorySegmentPREVIEW outLen, int parseHeader)  - 
zlibDecodeNoHeaderBuffer
public static int zlibDecodeNoHeaderBuffer(MemorySegmentPREVIEW obuffer, int olen, MemorySegmentPREVIEW ibuffer, int ilen)  - 
zlibDecodeNoheaderMalloc
public static MemorySegmentPREVIEW zlibDecodeNoheaderMalloc(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW outLen)  
 - 
 
STBImagewhen preview features are enabled.