Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpng: New version 1.6.23 #5362

Merged
merged 2 commits into from
Jun 23, 2016
Merged

libpng: New version 1.6.23 #5362

merged 2 commits into from
Jun 23, 2016

Conversation

J08nY
Copy link
Contributor

@J08nY J08nY commented Jun 22, 2016

Updated libpng to version 1.6.27 1.6.23
Needed to fix iCCp chunk in a lot of pngs, since libpng 1.6 is more strict in this matter. See [1] [2] [3].
Projects will also need to fix their pngs if they have an incorrect iCC profile or will receive warnings like:
ERROR: _png_warn_function: iCCP: known incorrect sRGB profile
Will do a PR in the godot-docs repo about this, adding some documentation about the errors and fixing them.

fixes #3059, updates: #5248

Warning: libpng 1.6 is strict about iCCp chunks being incorrect,
solution is to fix the profile. On *nix ImageMagicks "convert" works
on windows optiPNG.
neccesary for libpng 1.6.27 to work silently
@akien-mga akien-mga added this to the 2.1 milestone Jun 22, 2016
@akien-mga akien-mga merged commit 0a72f9c into godotengine:master Jun 23, 2016
@akien-mga
Copy link
Member

Meh, I merged too fast and noticed too late that you made a typo in the version number :) 1.6.27 does not exist, what we have is 1.6.23.

@akien-mga akien-mga changed the title libpng: New version 1.6.27 libpng: New version 1.6.23 Jun 23, 2016
@akien-mga
Copy link
Member

I fixed with 9bf3ee7 the bug that made libpng warnings treated as errors; they now raise a Godot warning instead:

WARNING: _png_warn_function: iCCP: known incorrect sRGB profile
   At: drivers/png/image_loader_png.cpp:65.

@J08nY
Copy link
Contributor Author

J08nY commented Jun 23, 2016

Oops, sorry on the version number, I guess we just have to wait for 1.6.27 and be like ha! We had that moths ago! 😃

@J08nY J08nY deleted the png branch June 23, 2016 14:45
@rgrams
Copy link

rgrams commented Jul 4, 2016

Well this is annoying. So is there a color profile that it will accept, or does everyone have to go through some rigmarole to remove the chunk for every new png?

@vnen
Copy link
Member

vnen commented Jul 4, 2016

@rgrams I fixed all my problems with ImageMagicks mogrify tool (just by running find . -name '*.png' -exec mogrify {} \; in my project's dir). If the profile is correct it'll accept, since not all of my project's PNGs were showing the warning.

@reduz
Copy link
Member

reduz commented Jul 4, 2016

I did some fixes to ScrollContainer some time ago, maybe it fixed it

On Mon, Jul 4, 2016 at 4:05 PM, George Marques notifications@github.com
wrote:

@rgrams https://github.com/rgrams I fixed all my problems with
ImageMagicks mogrify tool (just by running find . -name '*.png' -exec
mogrify {} ; in my project's dir). If the profile is correct it'll
accept, since not all of my project's PNGs were showing the warning.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#5362 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z2_WwrAqAUfUS7ycSwDTsXCwA6D6Zks5qSVltgaJpZM4I8IUU
.

@vnen
Copy link
Member

vnen commented Jul 4, 2016

@reduz maybe you meant to post on #3472?

@J08nY
Copy link
Contributor Author

J08nY commented Jul 5, 2016

@rgrams I will do a PR in godot-docs shortly, explaining the warning and will give instructions to fix PNGs on all platforms hopefully.

@rgrams
Copy link

rgrams commented Jul 5, 2016

Could the warning message be made to specify which image it's having an issue with?

@akien-mga
Copy link
Member

akien-mga commented Jul 5, 2016

Could the warning message be made to specify which image it's having an issue with?

I don't think so, at least not without modifying the libpng source code, but that's not something we should do. Those libpng16 warnings have been all over open source projects using PNGs for years, and have always been that unhelpful sadly; improving those warnings should be discussed directly upstream.

Edit: On second thought, actually we might be able to intercept the warning and mention what file triggered it, that's worth looking into.

@J08nY
Copy link
Contributor Author

J08nY commented Jul 5, 2016

@akien-mga Hmm will look into it, afaik libpng has no knowledge of the image source file in godot, it just reads the raw data and does its job. Although something of that sort could be done in image_loader_png.cpp

@J08nY
Copy link
Contributor Author

J08nY commented Jul 6, 2016

For everyone searching the repo for the error message:

WARNING: _png_warn_function: iCCP: known incorrect sRGB profile

Here is a guide to fixing PNGs.

@ghost
Copy link

ghost commented May 3, 2017

@reduz or @J08nY please...

if (png_sRGB_checks[i].is_broken != 0)

Is it legal to remove this if?

                  /* Warn that this being done; this isn't even an error since
                   * the profile is perfectly valid, but it would be nice if
                   * people used the up-to-date ones.
                   */

e: Denied here, I made a request: pnggroup/libpng#163

@akien-mga
Copy link
Member

No. We don't touch upstream sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update libpng to latest 1.6.x version
5 participants