mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 12:40:50 +00:00
Don't check sRGB profiles with libpng
This commit is contained in:
parent
65a2d9a4ba
commit
b40e942aed
@ -100,12 +100,13 @@ bool PngFormat::onLoad(FileOp* fop)
|
|||||||
*/
|
*/
|
||||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||||
fop->setError("Error reading PNG file\n");
|
fop->setError("Error reading PNG file\n");
|
||||||
/* Free all of the memory associated with the png_ptr and info_ptr */
|
|
||||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||||
/* If we get here, we had a problem reading the file */
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not check sRGB profile
|
||||||
|
png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, 1);
|
||||||
|
|
||||||
/* Set up the input control if you are using standard C streams */
|
/* Set up the input control if you are using standard C streams */
|
||||||
png_init_io(png_ptr, fp);
|
png_init_io(png_ptr, fp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user