Appcelerator Studio and libpng warnings on windows - appcelerator

so i'm using appcelerator studio, and when i run a build i get a bunch of libpng warnings about iccp
i'd very much like these warnings to go away - i don't know how.
i'm running a vanilla windows 10 build, so while i'm happy to do "stuff" to fix the hundreds of images that trigger the warning, i'd really like step-by-step, uh, steps to do so.
if on the other hand there is a simple way to tell appcelerator studio to stop using libpng 1.6 (or somehow downgrade to libpng 1.5?) that would be swell
or just tell appcelerator studio to ignore warnings - that would be neat too.
anything i can do is most welcome.
see this question for more details than i gave about the issue!

To fix the PNG files, you can use any libpng16 application to read them and rewrite them. You'll get the warnings once during this operation but not when you reread them later. You can use ImageMagick's "convert", GraphicsMagick's "gm convert", pngcrush (disclaimer, I wrote pngcrush), or any other PNG editor built with libpng16.
To suppress the libpng16 warnings about sRGB profiles without fixing the PNG files: if you can rebuild the application, add this line to the application source:
png_set_option(read_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
or you can rebuild libpng16 with the configure option
CPPFLAGS=-DPNG_sRGB_PROFILE_CHECKS=-1

This is likely because it's a project you created in Titanium 3.x or older and now run with Titanium 4.x or later, am I correct?
In 4.x we switched to use the Material Design theme which no longer uses PNGs but color palettes. Read about the change in the release notes and docs.

Related

Cinder + FreeImage + XCode

I am working on a project that uses Cinder for graphics, and for image loading, we are using FreeImage mainly for loading HDR images.
It is all working fine under windows, but now I am trying to build an OSX version I am hitting a snag.
First I tried to download and build FreeImage, but the makefiles are hopelessly outdated and do not work. I managed to fudge them and build the library, but when adding to xcode it didn't seem to link. The error was that the library was ignored because it was built with a different architecture. (I couldn't figure out how to fix this, but it is an option to go back to if all else fails).
Anyway, my next attempt was to use macports to install and build FreeImage. This all worked without error and I was able to include the library in my project.
However, the problem now it that I get many std linking errors. After searching around, it seems my problem is that freeimage was built with libstdc++, but cinder complains if I dont build my project with C++11.
So, is there any way of fixing this? Can I modify the make files macports uses to build freeimage? Or is there some other sneaky way? Any suggestions appreciated.
Sorry if this question is a bit parochial, but in my searches I have seen others with similar problems (but unfortunately few answers).

Revert XCode compression with pngcrush on windows?

I have some png images extracted from IPA files and I want to get the original PNG back, I was advised that pngcush did the task required so I downloaded it and tried running the following command:
pngcrush -fix icon.png icon1.png
But I get a libpng error. I don't know if libpng needs to be downloaded as well, since the error doesn't says that I need a different version of libpng, just says:
While reading icon.png:
pngcrush caught libpng error:
incorrect header check
I also tried this one:
pngcrush -revert-iphone-optimizations icon.png icn1.png
And pngcrush acts as if didn't knew the command.
Any ideas on what to do?
You may be interested in this C# library I developed to reverse what pngcrush does. All existing implementations I found were either riddled with bugs or too difficult to integrate into my project so I developed this. It has unit tests if that makes you feel safer.
The -iphone addition to pngcrush was added by Apple and is only available in the version of pngcrush in the iOS SDK, accessible by using xcrun like follows:
xcrun -sdk iphoneos pngcrush -iphone|-revert-iphone-optimizations ...
This answer: pngcrush: uncrush on linux? explains that -revert-iphone-optimizations is only present in the Apple version of pngcrush. But it does point to a couple of other options that might work. Linux, not Windows, but since there's source, you might get it to work.
Maybe you can try pngdefry.
Perfect dealing pngs with multiple IDAT tags.
It probably doesn't know the command. The documentation I found on -revert-iphone-optimizations comes from an apple developer page which refers to pngcrush being a part of the IOS SDK. Given that, i'd suggest it's been hacked into that specific version by apple and may not be part of the official pngcrush download. If that's true you'll actually need to install that and use the included pngcrush as explained in the article.
I'm also a bit suss on the syntax used in that example. It looks like a long option and they normally start with two hythens, not one. It could simply be a typo so try --revert-iphone-optimizations as well.

libpng warning: Application built with libpng-1.2.26 but running with 1.5.2

I have a problem on my mac when trying in R to produce png images.
I am getting this warnings:
libpng warning: Application built with libpng-1.2.26 but running with 1.5.2
I am running the R 2.14 version using the R-studio GUI.
I am not excatly sure about the libpng problem. When I am doing locate libpng-config I'm getting several hits, some with libong-config12, some with libpng-config14, some without nay numbers:
ayeroslaviz:~ ayeroslaviz$ locate libpng-config
/Applications/XAMPP/xamppfiles/bin/libpng-config
/Library/Frameworks/GTK+.framework/Versions/2.18.X11/Resources/bin/libpng-config
/opt/local/bin/libpng-config
/usr/X11/bin/libpng-config
/usr/local/bin/libpng-config
When doing which libpng-config I'm getting: /usr/local/bin/libpng-config
Is there a way to uninstall older versions of libpng or update the paths to the right version. Unfortunately I am not even sure, what thesource of this warning, so I hope I gave here all the needed information.
I would be grateful for anyone who gives me a hint about how to solve this problem.
thanks
A.
Fortunately, you're using a Mac, so there's a simpler (but not documented) method.
quartz.save('my_filename.png', type='png')
Note that the image you want to save must be the currently active quartz window.
If your code still works, then don't worry about it. The fact this this is a warning rather than an error message means that there might be a problem, not that there definitely is a problem. IF you don't want to see the warning, wrap your R code in a call to suppressMessages.
suppressMessages(code_to_call_libpng)
This problem could occur because RStudio (or some other library you are using in your project) is using in-built libpng libraries (v1.2) and when the application run, the version installed in the system is v1.5: http://www.libpng.org/pub/png/pngfaq.html#mismatch. If this is the point, you could try to upgrade RStudio libpng libraries or downgrade system libpng ones.

Making Android NDK apps with NativeActivity?

I know that in a normal NDK build, the C++ libraries are built and packed into an apk file. But how can I automate this in Eclipse? I have tried following http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ to run the native-activity sample that came with the NDK, and it ended up not working. Even after I got past most of the reference errors via including, nothing happens when I run it as an Android Application (with a Motorola phone plugged in).
I have looked around quite a bit about this and am still stuck, so I'm open to suggestions at this point. Thanks!
(Please keep in mind that I'm using MinGW/MSys on Windows 7, mostly for running scripts with bash)
I've just decided to go with an Ubuntu VM and use that, and with some tweaking it seems to be working the way it should. I used a combination of http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and http://developer.android.com/sdk/ndk/overview.html#native-activity to get everything set up. Also a very important note, go to C/C++ General -> Code Analysis -> Launching in your Eclipse project settings and disable both of those options for any native activities you make. I'm not sure if there's a good way to set the libs and includes up for it to work, but currently live bug checking screws things up in the NDK, and I can currently build successfully without it. Plus it'll still mark errors in red after a failed build, so you shouldn't be completely in the middle of nowhere when finding errors.

XCode and CUDA integration

Was just wondering if anyone has any experience working with CUDA and XCode? I'm having a nightmare setting it all up...
Dawson
I'm working with XCode, CMAKE & CUDA. No problems so far! Works like a charm, though you'll need to make sure, that XCode is using the gcc 4.0 instead of 4.2 (in case of 10.6).
I suggest you to also use CMAKE in combination with FindCUDA.cmake for generating the xcode project file. FindCUDA.cmake is here
There is also a plugin for XCode, making it recognize .cu files, found here in message #29. Also a good "tutorial" is given here, mentioning the plugin.

Resources