R_Leo_1 Posted November 27, 2019 Share Posted November 27, 2019 When I'm compiling a 7800 Basic program, I almost always get a "libpng warning: Incorrect bKGD chunk index value" for every graphic I use in the program. I got the message to go away once, but I have no idea what I did to make this happen. If anyone can help me in solving this issue I would greatly appreciate it, thank you. Also here's my code in case it's needed: LadyLady.bas Quote Link to comment Share on other sites More sharing options...
+mksmith Posted November 27, 2019 Share Posted November 27, 2019 43 minutes ago, R_Leo_1 said: When I'm compiling a 7800 Basic program, I almost always get a "libpng warning: Incorrect bKGD chunk index value" for every graphic I use in the program. I got the message to go away once, but I have no idea what I did to make this happen. If anyone can help me in solving this issue I would greatly appreciate it, thank you. Also here's my code in case it's needed: LadyLady.bas 3.09 kB · 1 download Hi! What program are you using to produce your pngs? and would it be possible to attach one of them for testing some things? If you are on Windows the latest versions of Paint.Net produce 4bit pngs which work on 7800basic (have used it myself recently). Quote Link to comment Share on other sites More sharing options...
R_Leo_1 Posted November 27, 2019 Author Share Posted November 27, 2019 Thank you for the reply! I use a combination of Paint.Net and Graphics Gale for my pngs. Here's some examples: Quote Link to comment Share on other sites More sharing options...
+mksmith Posted November 27, 2019 Share Posted November 27, 2019 Thanks - taking a look! Quote Link to comment Share on other sites More sharing options...
R_Leo_1 Posted November 27, 2019 Author Share Posted November 27, 2019 7 minutes ago, mksmith said: Thanks - taking a look! Awesome! I really appreciate it. Quote Link to comment Share on other sites More sharing options...
+mksmith Posted November 27, 2019 Share Posted November 27, 2019 Hi, Tested ok here (see attached - just remmed out most of the gfx and used the ones you provided). Perhaps the gfxblocks are either getting full or overflowing the breakup? As your using 160B and incbanner the chunk (see chunk2 is broken down into smaller sections below so it can be handled by 7800basic) they may be overflowing into the next gfxblock? Some sort of overflow might the the reason why it worked then didn't. Try starting back at one chunk then add other etc to see where it might be falling over. Starting build of LadyLady.bas... 7800basic 0.6 Jun 13 2019 22:37:29 *** (): INFO, GFX Block #0 starts @ $E000 Background100 chunk200 chunk201 chunk202 chunk203 chunk204 chunk205 chunk206 *** (): INFO, GFX block #0 has 3392 bytes left (212 x 16 bytes) gfx_LadyLady.zip 1 Quote Link to comment Share on other sites More sharing options...
R_Leo_1 Posted November 27, 2019 Author Share Posted November 27, 2019 Okay, thank you! I will give it a try and see what I get. 1 Quote Link to comment Share on other sites More sharing options...
R_Leo_1 Posted November 27, 2019 Author Share Posted November 27, 2019 Okay so certain graphics are only triggering it, any of the "chunks1-a" or "LogoRowChunks", are causing the issue, while both the "Background1-2" and any of the "Let" graphics are fine. I tried adding the chunks one by one, but just adding one chunk gives me this: 7800basic 0.6 Jul 12 2017 22:46:35 libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value libpng warning: Incorrect bKGD chunk index value *** (): INFO, GFX Block #0 starts @ $E000 chunk100 chunk101 chunk102 chunk103 chunk104 chunk105 chunk106 *** (): INFO, GFX block #0 has 3648 bytes left (228 x 16 bytes) It's a huge amount for just one chunk and adding another chunk just doubles the amount of warnings, so I'm not really sure what's going on with this. This time I'll include all graphics with the updated .bas file, to get a better idea of what's happening. Every incgraphic or incbanner is commented out, as well as the code related to drawing the screen, so you can selectively uncomment whichever of the commands you need to. Thanks for the help. LadyLady.zip 1 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted November 27, 2019 Share Posted November 27, 2019 Those warnings can be ignored (at least in every case I've come across so far). It's related to how the conversion process is handling your graphics files so nothing is wrong with your code and it will import fine anyway. I use image magick to convert to 4BPP and it corrects those warnings at the same time. I can post more details later. 2 Quote Link to comment Share on other sites More sharing options...
+SmittyB Posted November 27, 2019 Share Posted November 27, 2019 I just realised that through the power of Dropbox I can post more details now. Below is the command I use in a batch file to adjust files. Convert is one of the image magick programs and this takes a file I drag to the batch as a parameter, changes the bit depth, then saves over the file I gave it. You might want to back up the graphics before running them through this if they're your only copy. convert %1 -depth 4 %1 2 Quote Link to comment Share on other sites More sharing options...
R_Leo_1 Posted November 27, 2019 Author Share Posted November 27, 2019 7 minutes ago, SmittyB said: I just realised that through the power of Dropbox I can post more details now. Below is the command I use in a batch file to adjust files. Convert is one of the image magick programs and this takes a file I drag to the batch as a parameter, changes the bit depth, then saves over the file I gave it. You might want to back up the graphics before running them through this if they're your only copy. convert %1 -depth 4 %1 Oh okay that's good to know that it's nothing to worry about thank you! I'll have to check out magick regardless, it sounds like a useful program. 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted November 27, 2019 Share Posted November 27, 2019 @SmittyB Great stuff mate - thanks ? 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 28, 2019 Share Posted November 28, 2019 Thanks for looking into it, Matt and Smitty! It looks like a bug in some image creation programs. I think if I upgrade the libpng that gets compiled into 7800basic, it may silent deal with the bad value. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.