mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-22 06:41:08 +00:00
Do not check sRGB profile when reading/saving png files
Fixes https://community.aseprite.org/t/2656
This commit is contained in:
parent
f3265656f2
commit
4035952238
@ -127,6 +127,11 @@ bool PngFormat::onLoad(FileOp* fop)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Do don't check if the sRGB color profile is valid, it gives
|
||||
// problems with sRGB IEC61966-2.1 color profile from Photoshop.
|
||||
// See this thread: https://community.aseprite.org/t/2656
|
||||
png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
|
||||
|
||||
/* Allocate/initialize the memory for image information. */
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
if (info_ptr == NULL) {
|
||||
@ -477,6 +482,9 @@ bool PngFormat::onSave(FileOp* fop)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove sRGB profile checks
|
||||
png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
|
||||
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
if (info_ptr == NULL) {
|
||||
png_destroy_write_struct(&png_ptr, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user