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

Clear warnings when loading Dagestan and Louisiana flags #2319

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

lmoureaux
Copy link
Contributor

libpng was complaining about "bKGD: invalid". Not sure what this means, but loading and saving with imagemagick fixed the issue.

Closes #2291.

@lmoureaux lmoureaux requested a review from jwrober July 7, 2024 20:59
@lmoureaux lmoureaux changed the title Clear warnings when loading Dagestan and Lousiana flags Clear warnings when loading Dagestan and Louisiana flags Jul 7, 2024
@jwrober
Copy link
Collaborator

jwrober commented Jul 8, 2024

hm... not sure this fixes it...

[info] freeciv21-client (/home/jwrober/GitHub/freeciv21/client/connectdlg_common.cpp:237) - Starting freeciv21-server at /home/jwrober/GitHub/freeciv21/build_2319/freeciv21-server
[warning] freeciv21-client (unknown:0) - libpng warning: bKGD: invalid
[warning] freeciv21-client (unknown:0) - libpng warning: bKGD: invalid

@lmoureaux
Copy link
Contributor Author

Which tileset are you using?

@jwrober
Copy link
Collaborator

jwrober commented Jul 9, 2024

I'm not even in game yet

@jwrober
Copy link
Collaborator

jwrober commented Jul 9, 2024

This is what is configured
image

@lmoureaux
Copy link
Contributor Author

It probably says Loading tileset ... few messages up. I'll double check large tilesets

@jwrober
Copy link
Collaborator

jwrober commented Jul 9, 2024

My Fedora 40 workstation is running libpng 12

@jwrober
Copy link
Collaborator

jwrober commented Jul 9, 2024

It probably says Loading tileset ... few messages up. I'll double check large tilesets

The very next line after the second "invalid" shows this message

[info] freeciv21-client (/home/jwrober/GitHub/freeciv21/client/tileset/tilespec.cpp:1013) - Loading tileset "amplio2".

So it still seems to be before tileset selection

Dagestan flags were causing "libpng warning: bKGD: invalid" to be shown
by the client. Produce a valid PNG with ImageMagick.

Closes longturn#2291.
@lmoureaux
Copy link
Contributor Author

Dagestan flags are now the only files causing the warnings for me (Louisiana has meanwhile been modified). I updated the PR accordingly. If you still see warnings could you apply the following patch and report the file names?

diff --git a/client/tileset/sprite.cpp b/client/tileset/sprite.cpp
index d377e19fda..14d8f549e6 100644
--- a/client/tileset/sprite.cpp
+++ b/client/tileset/sprite.cpp
@@ -29,6 +29,7 @@ QPixmap *load_gfxfile(const char *filename)
   if (QPixmapCache::find(QString(filename), entire)) {
     return entire;
   }
+  qCritical() << "Reading file" << filename;
   entire->load(QString(filename));
   QPixmapCache::insert(QString(filename), *entire);
 

Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@jwrober jwrober merged commit d66d141 into longturn:master Oct 28, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libpng warning: bKGD: invalid
2 participants