|
|
@@ -698,7 +698,10 @@ void nvgFillPaint(struct NVGcontext* ctx, struct NVGpaint paint) |
|
|
|
int nvgCreateImage(struct NVGcontext* ctx, const char* filename) |
|
|
|
{ |
|
|
|
int w, h, n, image; |
|
|
|
unsigned char* img = stbi_load(filename, &w, &h, &n, 4); |
|
|
|
unsigned char* img; |
|
|
|
stbi_set_unpremultiply_on_load(1); |
|
|
|
stbi_convert_iphone_png_to_rgb(1); |
|
|
|
img = stbi_load(filename, &w, &h, &n, 4); |
|
|
|
if (img == NULL) { |
|
|
|
// printf("Failed to load %s - %s\n", filename, stbi_failure_reason()); |
|
|
|
return 0; |
|
|
|