mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
stbi: add image writing functions (#12754)
This commit is contained in:
1
thirdparty/stb_image/stb_image.h
vendored
1
thirdparty/stb_image/stb_image.h
vendored
@@ -561,6 +561,7 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const ch
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR)
|
||||
#include <math.h> // ldexp, pow
|
||||
#endif
|
||||
|
1730
thirdparty/stb_image/stb_image_write.h
vendored
Normal file
1730
thirdparty/stb_image/stb_image_write.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
thirdparty/stb_image/stb_v_header.h
vendored
Normal file
6
thirdparty/stb_image/stb_v_header.h
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* stbi set globals var functions
|
||||
*/
|
||||
void set_png_compression_level(int level);
|
||||
void write_force_png_filter(int level);
|
||||
void write_tga_with_rle(int level);
|
21
thirdparty/stb_image/stbi.c
vendored
21
thirdparty/stb_image/stbi.c
vendored
@@ -1,3 +1,22 @@
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
#include "stb_image_write.h"
|
||||
|
||||
/*
|
||||
void set_png_compression_level(int level);
|
||||
void write_force_png_filter(int level);
|
||||
void write_tga_with_rle(int level);
|
||||
*/
|
||||
|
||||
void set_png_compression_level(int level) {
|
||||
stbi_write_png_compression_level = level;
|
||||
}
|
||||
|
||||
void write_force_png_filter(int level){
|
||||
stbi_write_force_png_filter = level;
|
||||
}
|
||||
|
||||
void write_tga_with_rle(int level) {
|
||||
stbi_write_tga_with_rle = level;
|
||||
}
|
Reference in New Issue
Block a user