minor bugfixes #38
|
@ -1607,6 +1607,10 @@ mg_image mg_image_create_from_data(mg_surface surface, str8 data, bool flip)
|
||||||
image = mg_image_create_from_rgba8(surface, width, height, pixels);
|
image = mg_image_create_from_rgba8(surface, width, height, pixels);
|
||||||
free(pixels);
|
free(pixels);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log_error("stbi_load_from_memory() failed: %s\n", stbi_failure_reason());
|
||||||
|
}
|
||||||
return(image);
|
return(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1626,6 +1630,10 @@ mg_image mg_image_create_from_file(mg_surface surface, str8 path, bool flip)
|
||||||
image = mg_image_create_from_rgba8(surface, width, height, pixels);
|
image = mg_image_create_from_rgba8(surface, width, height, pixels);
|
||||||
free(pixels);
|
free(pixels);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log_error("stbi_load() failed: %s\n", stbi_failure_reason());
|
||||||
|
}
|
||||||
return(image);
|
return(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue