Important Info: sRBGWarning Figured Out

When at first Robin didn’t pay much mind to me mentioning it in a post somewhere, I thought there might be a problem elsewhere.
After almost pulling my hair out trying to figure out what was causing this, I have some general thoeries/fixes.

Here is a image link(72ppi) describing what I did to fix this. Basically copyed the image into a new doc(72ppi) and resaved the images with 72(default) resolution. Maybe something else was corrupt/different in the original files also, but I wouldn’t tend to think so.
http://img443.imageshack.us/img443/7352/rtvx.png
How this happened… Well back when I made the images, my default photoshop doc apparently was set to 300ppi for making better quality high res images.
It just happened that when I made these batch of images they where 16px size, which @ 300ppi is absurdly overkill and not required.
As far as if a bigger size 300ppi images will still cause this error(It shouldn’t) is untested at the moment. I am thinking this might have to do with libpng but I may be wrong.

@ Robin. Could you look into what may be causing the warnings. I have attached the two help.png icons, so you can test loading them if necessary in a sample test bitmap app.

ppiImages.7z (3.86 KB)

Metallicow wrote:

When at first Robin didn't pay much mind to me mentioning it in a post
somewhere, I thought there might be a problem elsewhere.

Sorry, I've been super busy the past few weeks and Phoenx has gotten pushed to the side a bit. My time is less crunched right now, but I'm forcing myself to not work on Phoenix again until I can get a 2.9.5 release of Classic done, otherwise I'll spend all my time on Phoenix and won't be motivated to do anything with Classic. (IOW, a self-imposed carrot/stick) :slight_smile:

After almost pulling my hair out trying to figure out what was causing
this, I have some general thoeries/fixes.

Here is a image link(72ppi) describing what I did to fix this. Basically
copyed the image into a new doc(72ppi) and resaved the images with
72(default) resolution. Maybe something else was corrupt/different in
the original files also, but I wouldn't tend to think so.
ImageShack - Best place for all of your image hosting and image sharing needs
How this happened... Well back when I made the images, my default
photoshop doc apparently was set to 300ppi for making better quality
high res images.
It just happened that when I made these batch of images they where 16px
size, which @ 300ppi is absurdly overkill and not required.
As far as if a bigger size 300ppi images will still cause this error(It
shouldn't) is untested at the moment. I am thinking this might have to
do with libpng but I may be wrong.

@ Robin. Could you look into what may be causing the warnings. I have
attached the two help.png icons, so you can test loading them if
necessary in a sample test bitmap app.

You are right that it has to do with libpng, wx has updated the built-in version of it semi-recently. There is this ticket in wxTrac about it:

     wxTrac has been migrated to GitHub Issues - wxWidgets
     wxTrac has been migrated to GitHub Issues - wxWidgets

There is also some info there about suppressing the log warning messages if you want. There is also a way to remove the profile info from the image files, although I don't know if that will have any side effects.

Apparently the libpng group has decided that an apparently commonly used profile is not valid, or perhaps that it does not match the actual image data. A google search will probably turn up more info and perhaps a suitable alternative that will be accepted my the library without complaining.

···

--
Robin Dunn
Software Craftsman

So oddly, I only receive this error on 2.9.5 for Windows. The x64 Linux build of 2.9.5 on RHEL6 I’m using doesn’t emit this warning.

···

On Sunday, August 25, 2013 9:28:11 PM UTC-6, Metallicow wrote:

When at first Robin didn’t pay much mind to me mentioning it in a post somewhere, I thought there might be a problem elsewhere.
After almost pulling my hair out trying to figure out what was causing this, I have some general thoeries/fixes.

Here is a image link(72ppi) describing what I did to fix this. Basically copyed the image into a new doc(72ppi) and resaved the images with 72(default) resolution. Maybe something else was corrupt/different in the original files also, but I wouldn’t tend to think so.
http://img443.imageshack.us/img443/7352/rtvx.png
How this happened… Well back when I made the images, my default photoshop doc apparently was set to 300ppi for making better quality high res images.
It just happened that when I made these batch of images they where 16px size, which @ 300ppi is absurdly overkill and not required.
As far as if a bigger size 300ppi images will still cause this error(It shouldn’t) is untested at the moment. I am thinking this might have to do with libpng but I may be wrong.

@ Robin. Could you look into what may be causing the warnings. I have attached the two help.png icons, so you can test loading them if necessary in a sample test bitmap app.

I guess I forgot so mention that when I first came across it was when I was developing phoenix… Which apparently those updates(whatever they are…) made it into 2.9.5 classic also. Including Scintilla and libpng(whatever the real problem is…)
The way I found the offending images was to create a simple app that loads every imagename.ext as a button in a (VERTICAL) sizer and scrolled panel, then bind every button to load a bitmap, when pressed.
I then used my G11 keyboard with tab/enter macro to activate the buttons, going though them 5 or 10 at a time until one activated popped up the error. I then noted the offending images in a txt, then resaved images properly in photoshop or other image manipulation app.
Painful… I know. It was the very first “Buggish” thing I discovered when My app finally fired up on phoenix, and happened every time I fired my app up until I figured it out.

I have the uploaded the testing app as an attachment. It should help you pinpoint them.
This will help you greatly when trying to find these specific images, because at least on windows, just an annoying warning dialog shows up.
It doesn’t tell you what the image names are, but at least it usually tells you how many there are.

sRGBWarningApp.py (2.53 KB)

···

On Wednesday, September 18, 2013 4:09:22 PM UTC-5, Josh wrote:

So oddly, I only receive this error on 2.9.5 for Windows. The x64 Linux build of 2.9.5 on RHEL6 I’m using doesn’t emit this warning.

On Sunday, August 25, 2013 9:28:11 PM UTC-6, Metallicow wrote:

When at first Robin didn’t pay much mind to me mentioning it in a post somewhere, I thought there might be a problem elsewhere.
After almost pulling my hair out trying to figure out what was causing this, I have some general thoeries/fixes.

Here is a image link(72ppi) describing what I did to fix this. Basically copyed the image into a new doc(72ppi) and resaved the images with 72(default) resolution. Maybe something else was corrupt/different in the original files also, but I wouldn’t tend to think so.
http://img443.imageshack.us/img443/7352/rtvx.png
How this happened… Well back when I made the images, my default photoshop doc apparently was set to 300ppi for making better quality high res images.
It just happened that when I made these batch of images they where 16px size, which @ 300ppi is absurdly overkill and not required.
As far as if a bigger size 300ppi images will still cause this error(It shouldn’t) is untested at the moment. I am thinking this might have to do with libpng but I may be wrong.

@ Robin. Could you look into what may be causing the warnings. I have attached the two help.png icons, so you can test loading them if necessary in a sample test bitmap app.

Also note that images from Creative Commons Images causes this Warning also.

Therefore… Beware of any image off of the net as well as your own.

Images are real picky. At least it doesn’t crash as with most image issues.
Fix your offending images in the meantime until there is a proper fix or libpng gets it’s head out of it’s ass.

You can’t change the world with one commit, but you can with one image.
Better send that image to the devs at libpng. A Creative Commons one BTW. And you should do the same. Lets set a standard for crap images, not jpgs with a png ext.

Josh wrote:

So oddly, I only receive this error on 2.9.5 for Windows. The x64 Linux
build of 2.9.5 on RHEL6 I'm using doesn't emit this warning.

Because the build on Linux is using the libpng already installed on the system instead of the one in the wx source tree. If your distro updates to the latest libpng without patching it for this issue then you'll have the same problem.

···

--
Robin Dunn
Software Craftsman