java.lang.Object
overrungl.stb.STBImageWrite
STBImageWrite
relies on preview features of the Java platform:
STBImageWrite
refers to one or more preview APIs:Arena
,MemorySegment
,SegmentAllocator
.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
The STB image writer.
- Since:
- 0.1.0
- Author:
- squid233
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
bmp
(String filename, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
bmpToFunc
(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static void
flipVerticallyOnWrite
(boolean flip) static int
static int
static boolean
static boolean
hdr
(SegmentAllocatorPREVIEW allocator, String filename, int w, int h, int comp, float[] data) static boolean
hdrToFunc
(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, float[] data) static boolean
jpg
(String filename, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static boolean
jpgToFunc
(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static boolean
nbmp
(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
nbmpToFunc
(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
nhdr
(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
nhdrToFunc
(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
njpg
(MemorySegmentPREVIEW filename, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static boolean
njpgToFunc
(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static boolean
npng
(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static boolean
npngToFunc
(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static MemorySegmentPREVIEW
npngToMem
(MemorySegmentPREVIEW pixels, int strideInBytes, int x, int y, int n, MemorySegmentPREVIEW outLen) static boolean
ntga
(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
ntgaToFunc
(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static MemorySegmentPREVIEW
nzlibCompress
(MemorySegmentPREVIEW data, int dataLen, MemorySegmentPREVIEW outLen, int quality) static boolean
png
(String filename, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static boolean
pngToFunc
(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static byte[]
pngToMem
(SegmentAllocatorPREVIEW allocator, byte[] pixels, int strideInBytes, int x, int y, int n, int[] outLen) static void
setWriteForcePngFilter
(int filter) static void
setWritePngCompressionLevel
(int level) static void
setWriteTgaWithRle
(boolean rle) static boolean
tga
(String filename, int w, int h, int comp, MemorySegmentPREVIEW data) static boolean
tgaToFunc
(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static byte[]
zlibCompress
(SegmentAllocatorPREVIEW allocator, byte[] data, int[] outLen, int quality)
-
Method Details
-
getWriteTgaWithRle
public static boolean getWriteTgaWithRle() -
getWritePngCompressionLevel
public static int getWritePngCompressionLevel() -
getWriteForcePngFilter
public static int getWriteForcePngFilter() -
setWriteTgaWithRle
public static void setWriteTgaWithRle(boolean rle) -
setWritePngCompressionLevel
public static void setWritePngCompressionLevel(int level) -
setWriteForcePngFilter
public static void setWriteForcePngFilter(int filter) -
npng
public static boolean npng(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) -
nbmp
public static boolean nbmp(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) -
ntga
public static boolean ntga(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) -
nhdr
public static boolean nhdr(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) -
njpg
public static boolean njpg(MemorySegmentPREVIEW filename, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) -
png
public static boolean png(String filename, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) -
bmp
-
tga
-
hdr
public static boolean hdr(SegmentAllocatorPREVIEW allocator, String filename, int w, int h, int comp, float[] data) -
jpg
public static boolean jpg(String filename, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) -
npngToFunc
public static boolean npngToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) -
nbmpToFunc
public static boolean nbmpToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) -
ntgaToFunc
public static boolean ntgaToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) -
nhdrToFunc
public static boolean nhdrToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) -
njpgToFunc
public static boolean njpgToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) -
pngToFunc
public static boolean pngToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) -
bmpToFunc
public static boolean bmpToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) -
tgaToFunc
public static boolean tgaToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) -
hdrToFunc
public static boolean hdrToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, float[] data) -
jpgToFunc
public static boolean jpgToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) -
flipVerticallyOnWrite
public static void flipVerticallyOnWrite(boolean flip) -
npngToMem
public static MemorySegmentPREVIEW npngToMem(MemorySegmentPREVIEW pixels, int strideInBytes, int x, int y, int n, MemorySegmentPREVIEW outLen) -
pngToMem
public static byte[] pngToMem(SegmentAllocatorPREVIEW allocator, byte[] pixels, int strideInBytes, int x, int y, int n, int[] outLen) -
nzlibCompress
public static MemorySegmentPREVIEW nzlibCompress(MemorySegmentPREVIEW data, int dataLen, MemorySegmentPREVIEW outLen, int quality) -
zlibCompress
public static byte[] zlibCompress(SegmentAllocatorPREVIEW allocator, byte[] data, int[] outLen, int quality)
-
STBImageWrite
when preview features are enabled.