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.
Related
I am trying to install 'David's Batch Processor' in order to batch convert multiple very large folders of RAW images to jpeg. I have tried using this guide to install the plugin, but it is very unclear what files I should move and where, since none of the files provided on the DBP website are saved as .py or SCM. The DBP website says I need "g++ and the gimp development packages for the appropriate Gimp version ". I have never used g++ or used any gimp development packages before. I feel like I'm way over my head but would like to learn how to do this!
g++ is a C++ compiler (actually a thin front-end over gcc).
Normally you would just do make; make install but this requires some other tools such as make that are part of the build-essentials package on Linux.
DBP has a competitor (or successor, since DBP updates seem to have stopped in 2013) called BIMP, and its GitHub page has instructions to build it on macOS. And even if you prefer DBP these instructions may apply in good part to DBP.
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.
I'm building OSX commandline apps. it's almost complete.
source code is open'd in my github.
but I want to distribute its "binary(Execute file)" as free ware but I can't understand the method.
simply should I extract execute file and place my blog?
I'm sorry because my english is poor.
Make sure you are building a release version of your app as described here How to deploy a Mac Command Line Tool
Then you can place the binary on your blog or on any other page. Make sure you are not using any libraries that may be missing from other people Macs.
Note it is always helpful if you add a description what your app does, how it needs to be called (arguments, ...) and maybe give some screenshots or in case of a command line app textual version of outputs.
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).
How can I unzip a file in MacOS X Obj-C? What frameworks do I need and what is the call?
You might find something helpful here at CocoaDev or with theunarchiver. theunarchiver is a nice utility that handles many archive formats and since it's open-source, you may be able to use some of their code to do what you want, though it's LGPL, which may or may not be compatible with what you're doing.
libz.1.2.3.dylib is the framework you should add to your project.
And use the the classes:
http://code.google.com/p/ziparchive/downloads/list