java.lang.Object
overrungl.stb.STBImageWrite
STBImageWrite relies on preview features of the Java platform:
STBImageWriterefers 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 booleanbmp(String filename, int w, int h, int comp, MemorySegmentPREVIEW data) static booleanbmpToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static voidflipVerticallyOnWrite(boolean flip) static intstatic intstatic booleanstatic booleanhdr(SegmentAllocatorPREVIEW allocator, String filename, int w, int h, int comp, float[] data) static booleanhdrToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int w, int h, int comp, float[] data) static booleanjpg(String filename, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static booleanjpgToFunc(ArenaPREVIEW arena, STBIWriteFunc func, MemorySegmentPREVIEW context, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static booleannbmp(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) static booleannbmpToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static booleannhdr(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) static booleannhdrToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static booleannjpg(MemorySegmentPREVIEW filename, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static booleannjpgToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int x, int y, int comp, MemorySegmentPREVIEW data, int quality) static booleannpng(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static booleannpngToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static MemorySegmentPREVIEWnpngToMem(MemorySegmentPREVIEW pixels, int strideInBytes, int x, int y, int n, MemorySegmentPREVIEW outLen) static booleanntga(MemorySegmentPREVIEW filename, int w, int h, int comp, MemorySegmentPREVIEW data) static booleanntgaToFunc(MemorySegmentPREVIEW func, MemorySegmentPREVIEW context, int w, int h, int comp, MemorySegmentPREVIEW data) static MemorySegmentPREVIEWnzlibCompress(MemorySegmentPREVIEW data, int dataLen, MemorySegmentPREVIEW outLen, int quality) static booleanpng(String filename, int w, int h, int comp, MemorySegmentPREVIEW data, int strideInBytes) static booleanpngToFunc(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 voidsetWriteForcePngFilter(int filter) static voidsetWritePngCompressionLevel(int level) static voidsetWriteTgaWithRle(boolean rle) static booleantga(String filename, int w, int h, int comp, MemorySegmentPREVIEW data) static booleantgaToFunc(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)
-
STBImageWritewhen preview features are enabled.