GithubHelp home page GithubHelp logo

dhowett / pincrush Goto Github PK

View Code? Open in Web Editor NEW
55.0 6.0 7.0 724 KB

Pincrush is an open PNG optimizer implementing Apple's proprietary CgBI format.

Home Page: http://howett.net/pincrush

License: MIT License

C 98.73% Makefile 0.13% C++ 1.13%

pincrush's Introduction

An attempt to replicate Apple's PNG Mangler.

Apple's PNG files are nowhere near valid (extra critical chunk with an unknown format, zlib headers discarded, premultiplied alpha). "Think different" and all that.

Prerequisites

  • a compiler
    • (for iPhone compilation) Apple's Xcode or the open toolchain

Compiling

  • iPhone (default target)

      make
    
  • Native (linux, OS X)

      make target=native
    

pincrush's People

Contributors

dhowett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pincrush's Issues

License?

Hi Dustin,

thanks for the great library! What license it it under? Can you make it MIT?
the code may imply that it's public domain, but I don't like ambiguity.

Thanks!
Peter

Error when compiling

I see that you were active here a few days ago, so I hope you will see this too!

At first it complain about not finding g++, so I made a symlink. A little later it crashes during compiling. Do you have any idea what might be wrong?

~/Dropbox/Developer/iOS/pincrush(master) » sudo ln -s /usr/bin/g++ /usr/bin/g++-4.2      andeh@A-MBP
------------------------------------------------------------
~/Dropbox/Developer/iOS/pincrush(master) » make target=native                            andeh@A-MBP
Making all in subprojects of tool pincrush...
Making all for subproject png...
 Compiling png.c...
png.c:548:12: error: explicitly assigning value of variable of type 'png_structp'
      (aka 'struct png_struct_def *') to itself [-Werror,-Wself-assign]
   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */
   ~~~~~~~ ^ ~~~~~~~
png.c:580:12: error: explicitly assigning value of variable of type 'png_structp'
      (aka 'struct png_struct_def *') to itself [-Werror,-Wself-assign]
   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */
   ~~~~~~~ ^ ~~~~~~~
png.c:588:12: error: explicitly assigning value of variable of type 'png_structp'
      (aka 'struct png_struct_def *') to itself [-Werror,-Wself-assign]
   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */
   ~~~~~~~ ^ ~~~~~~~
png.c:596:12: error: explicitly assigning value of variable of type 'png_structp'
      (aka 'struct png_struct_def *') to itself [-Werror,-Wself-assign]
   png_ptr = png_ptr;  /* Silence compiler warning about unused png_ptr */
   ~~~~~~~ ^ ~~~~~~~
4 errors generated.
make[3]: *** [obj/macosx/png.c.o] Error 1
make[2]: *** [internal-subproject-all_] Error 2
make[1]: *** [png.all.subproject.variables] Error 2
make: *** [pincrush.all.tool.variables] Error 2

pincrush causes png images broken

theos is using pincrush to optimize the png images but it will cause pngs broken, any idea?

ifeq ($(_THEOS_FINAL_PACKAGE),$(_THEOS_TRUE))
# 	causes png broken
# 	find $(THEOS_STAGING_DIR) -name \*.png -a ! -type l -exec pincrush -i {} \;
	find $(THEOS_STAGING_DIR) \( -name \*.plist -or -name \*.strings \) -exec plutil -convert binary1 {} \;
endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.