java.lang.Object
overrungl.stb.STBImage
STBImage
relies on preview features of the Java platform:
STBImage
refers 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
Modifier and TypeFieldDescriptionstatic final int
Image channelsstatic final int
Image channelsstatic final int
Image channelsstatic final int
Image channelsstatic final int
Image channels -
Method Summary
Modifier and TypeMethodDescriptionstatic void
convertIphonePngToRgb
(boolean shouldConvert) static void
convertIphonePngToRgbThread
(boolean shouldConvert) static @Nullable String
static void
free
(MemorySegmentPREVIEW retValFromLoad) static void
hdrToLdrGamma
(float gamma) static void
hdrToLdrScale
(float scale) static boolean
static boolean
infoFromCallbacks
(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] comp) static boolean
infoFromFile
(MemorySegmentPREVIEW f, int[] x, int[] y, int[] comp) static boolean
infoFromMemory
(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static boolean
infoFromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] comp) static boolean
static boolean
is16BitFromCallbacks
(STBIIoCallbacks clbk, MemorySegmentPREVIEW user) static boolean
static boolean
static boolean
is16BitFromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer) static boolean
static boolean
isHdrFromCallbacks
(STBIIoCallbacks clbk, MemorySegmentPREVIEW user) static boolean
static boolean
isHdrFromMemory
(MemorySegmentPREVIEW buffer) static boolean
isHdrFromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer) static void
ldrToHdrGamma
(float gamma) static void
ldrToHdrScale
(float scale) static MemorySegmentPREVIEW
static MemorySegmentPREVIEW
static MemorySegmentPREVIEW
load16FromCallbacks
(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
load16FromMemory
(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
load16FromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
static MemorySegmentPREVIEW
loadfFromCallbacks
(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadfFromFile
(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadfFromMemory
(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadfFromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadFromCallbacks
(STBIIoCallbacks clbk, MemorySegmentPREVIEW user, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadFromFile
(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadFromFile16
(MemorySegmentPREVIEW f, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadFromMemory
(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadFromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[] x, int[] y, int[] channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
loadGifFromMemory
(MemorySegmentPREVIEW buffer, MemorySegmentPREVIEW delays, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW z, MemorySegmentPREVIEW comp, int reqComp) static MemorySegmentPREVIEW
loadGifFromMemory
(SegmentAllocatorPREVIEW allocator, byte[] buffer, int[][] delays, int[] x, int[] y, int[] z, int[] comp, int reqComp) static MemorySegmentPREVIEW
static boolean
ninfo
(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static boolean
ninfoFromCallbacks
(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static boolean
ninfoFromFile
(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static boolean
ninfoFromMemory
(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW comp) static boolean
nis16Bit
(MemorySegmentPREVIEW filename) static boolean
static boolean
nis16BitFromMemory
(MemorySegmentPREVIEW buffer, int len) static boolean
nisHdr
(MemorySegmentPREVIEW filename) static boolean
static boolean
nisHdrFromMemory
(MemorySegmentPREVIEW buffer, int len) static MemorySegmentPREVIEW
nload
(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nload16
(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nload16FromCallbacks
(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nload16FromMemory
(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadf
(MemorySegmentPREVIEW filename, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadfFromCallbacks
(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadfFromFile
(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadfFromMemory
(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadFromCallbacks
(MemorySegmentPREVIEW clbk, MemorySegmentPREVIEW user, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadFromFile
(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadFromFile16
(MemorySegmentPREVIEW f, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadFromMemory
(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW channelsInFile, int desiredChannels) static MemorySegmentPREVIEW
nloadGifFromMemory
(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW delays, MemorySegmentPREVIEW x, MemorySegmentPREVIEW y, MemorySegmentPREVIEW z, MemorySegmentPREVIEW comp, int reqComp) static void
setFlipVerticallyOnLoad
(boolean shouldFlip) static void
setFlipVerticallyOnLoadThread
(boolean shouldFlip) static void
setUnpremultiplyOnLoad
(boolean shouldUnpremultiply) static void
setUnpremultiplyOnLoadThread
(boolean shouldUnpremultiply) static int
zlibDecodeBuffer
(MemorySegmentPREVIEW obuffer, int olen, MemorySegmentPREVIEW ibuffer, int ilen) static MemorySegmentPREVIEW
zlibDecodeMalloc
(MemorySegmentPREVIEW buffer, int len, MemorySegmentPREVIEW outLen) static MemorySegmentPREVIEW
zlibDecodeMallocGuesssize
(MemorySegmentPREVIEW buffer, int len, int initialSize, MemorySegmentPREVIEW outLen) static MemorySegmentPREVIEW
zlibDecodeMallocGuesssizeHeaderflag
(MemorySegmentPREVIEW buffer, int len, int initialSize, MemorySegmentPREVIEW outLen, int parseHeader) static int
zlibDecodeNoHeaderBuffer
(MemorySegmentPREVIEW obuffer, int olen, MemorySegmentPREVIEW ibuffer, int ilen) static MemorySegmentPREVIEW
zlibDecodeNoheaderMalloc
(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)
-
STBImage
when preview features are enabled.