Giter VIP home page Giter VIP logo

crunch's People

Contributors

abbudao avatar chrissimpkins avatar dsouzarc avatar garyjacobs avatar kawarimidoll avatar kcy1019 avatar kimond avatar perillamint avatar xjohn600 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  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  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  avatar  avatar  avatar  avatar  avatar

crunch's Issues

DMG version - pngquant missing

Dyld Error Message:
Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /Applications/Crunch.app/Contents/Resources/./pngquant

Where it works well, where it does not...

I would like to pull together more data on use cases where this is an appropriate tool and use cases where it is not. My experience is limited to the image types that I commonly make/use and I can say that after a couple of years' experience with the approach here it seems to be:

Useful, appropriate for:

  • small color ranges
  • limited range to no color gradients (subset of above issue)
  • black/white without wide grey range transitions (maybe? I haven't looked at much here)

Probably/maybe not appropriate for:

  • wide color ranges
  • color gradients (subset of above issue)

I would like to open this up for conversation with others out there so that we have a breadth of experience across different image styles. We can be objective about this by testing with the DSSIM tool across different types of image files. My gist is that as this value reaches and exceeds a value of 0.002 my eye begins to notice artifacts. It is possible that this could be turned into a parameter for the optimizations if it is real and able to be further generalized.

Goal will be to:

(1) document this for those who are interested in the tool
(2) further optimize the strategy used here by having much more objective data to base the optimization settings on. I think that we may be able to find a way to improve the compression ratios further, but likely only for certain types of image files.

If you have any thoughts, please weigh in and post examples of your images pre/post. If you have the ability to do so, please measure the DSSIM score for your pre/post optimization files with the open source dssim tool that is available here: https://github.com/kornelski/dssim (and include the version of the dssim tool that you used!)

Thanks!

Only support PNG compression?

Hello, it's a great privilege to see Crunch open source 👏🏼, but currently only support PNG compression?

English is not my native language; please excuse typing errors.

🤔

Not working .dmg

Hi! I already installed the .dmg for mac (High Sierra), moved it into applications folder and then open it. After that, I try to drag files into the application but nothing happens...

PNG Format partially working

Hi Chris,

Attached are the PNG images in question.
They were all exported from Sketch from a single symbol. So in theory they are all the same image just at different sizes.

spacexflight3l
spacexflight3m
spacexflight3s
spacexflight3t

Crunch 1.0 (installer) doesn't work but brew 0.9.0 does

Crunch 1.0 (installer) doesn't work but brew 0.9.0 does
Mac OS X 10.10.5

dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib Referenced from: /Volumes/Crunch Installer/Crunch.app/Contents/Resources/./pngquant Reason: Incompatible library version: pngquant requires version 51.0.0 or later, but libpng16.16.dylib provides version 47.0.0 /Volumes/Crunch Installer/Crunch.app/Contents/Resources/script: line 10: 64882 Trace/BPT trap: 5 ./pngquant --quality=80-98 --skip-if-larger --force --ext -crunch.png "$imagepath" > /dev/null

screen shot 2018-03-26 at 16 57 47

the older 0.9.0 installed by brew works just fine
screen shot 2018-03-26 at 16 57 53

Be more up front that this is lossy compression

I think you should say up front, quite clearly, that this is lossy compression. I wasn't aware of that until you mentioned in another issue.

The word lossy is only mentioned once in the README in the "Examples" section.

Given that repeat processing of the same file can degrade image quality it's quite important for people to know they should keep their master images around.

option: Cover the original file

Hi Crunch team,

Life saving tool!!!
Could you add a function that allow user to cover the original files directly with the crunched files generated? Thank you!

Greetings from Holland.
Bikman

Max CPU on idle (Mojave, GUI)

Describe the bug
Upon opening crunch GUI, CPU usage sits 94-98%, even when no image has been optimised.

To Reproduce
Steps to reproduce the behavior:

  1. Open 'application...'
  2. Open activity monitor

Expected behavior
No cpu usage while idle

Screenshots and/or Log Text
screenshot 2018-06-12 at 09 57 47

Adams-MBP:~ adamtester$ cat ~/.crunch/crunch.log
06-12-18 09:56:39	INFO	[ 42.47% ] /Users/adamtester/Downloads/menu-logo-crunch.png (1984 bytes)
06-12-18 09:56:39	INFO	Crunch execution ended.

Desktop (please complete the following information):

  • OS: macOs 10.14 Beta
  • Version: Crunch 3.0.0 GUI installed from prebuilt dmg

Additional context
Using beta macOS

Create a new custom zopflipng build

I am tweaking the upstream google/zopfli source to achieve better zopflipng compression with 8-bit quantized PNG files. This custom zopflipng build will be included in the v3.0.0 release of Crunch. This build of zopflipng will be available for use through all of the Crunch tools. Work is taking place in chrissimpkins/zopfli. Testing is being performed on the true color PNG files in the Kodak Image Suite.

This issue replaces #34

  • add embedded binary to macOS GUI (also supports the right-click menu service on macOS)
  • create a tagged release of zopfli
  • update dependency build script

pngquant libraries not loaded dmg installer & homebrew cask install approaches (libpng + little-cms2) [fixed!]

After installing wthe DMG file and dragging the PNG, this is what I got:

dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib Referenced from: /Applications/Crunch.app/Contents/Resources/./pngquant Reason: image not found /Applications/Crunch.app/Contents/Resources/script: line 10: 6549 Abort trap: 6 ./pngquant --quality=80-98 --skip-if-larger --force --ext -crunch.png "$imagepath" > /dev/null

@chrissimpkins edits below -------

Associated closed issue reports to limit discussion to this thread:

#10
#12

TODO:

  • update homebrew cask install script with pngquant dependencies (fix confirmed for those who install with homebrew cask in #7 (comment))
  • definitive solution is to use static linking for these libraries in the pngquant compile. New issue report #13 opened to address this. A new release will be prepared with this fix. I think that a transition to dynamic library linking may have happened at some stage along the way in the pngquant compile and I missed it... (this should be fixed in v1.0.1, awaiting confirmation)

FIX IS AVAILABLE (v1.0.1)

For those who previously used the Homebrew Cask installer

Try to install with the Homebrew cask install approach again. The installer script was updated with a couple of new dependencies and this should now be fixed

For those who want to install with the dmg installer

Please attempt your install with the v1.0.1 build. This should be the fix for this issue. Feedback needed to confirm and close this issue report.

https://github.com/chrissimpkins/Crunch/releases/tag/v1.0.1

Add parallel image processing support

Include:

  • Automated testing for multiple image requests
  • Automated process spawns up to number of available CPU

Will support much faster optimization for multi image requests on multi processor machines

Update zopflipng

Latest release is in the google/zopfli repository is tagged zopfli-1.0.1. Commits to master since include google/zopfli@e0e937e that suggest there may be improvements in compression of smaller files.

@lvandeve Lode, is the tip of google/zopfli master stable for production use? The latest tagged release was zopfli-1.0.1 (google/zopfli@89cf773) back in 2015. This is what I am using here to compile the zopflipng executable but more recent commit messages suggest there may have been compression improvements for smaller pre-files since that time. I don't see a test suite to confirm on my own.

TODO:

  • update compile shell script (ed06efa)
  • build new embedded executable for macOS GUI and right click menu service (ba8d0db)

Autoupdate macOS GUI with Homebrew cask

Homebrew cask now supports the following command which will automatically update the Crunch macOS GUI installed through Homebrew cask to new releases since you last installed/updated:

$ brew cask upgrade

Thanks to @adidalal for this information in #49 (comment). Will update documentation on the README and in the macOS GUI About text.

TODO:

  • update macOS GUI About text with homebrew cask upgrade approach to upgrades
  • update macOS GUI repository documentation with homebrew cask upgrade approach to upgrades

Fix for multiple directory levels with spaces in path names macOS GUI + right-click menu service

This issue only affects the macOS GUI and macOS right-click menu service tools. It does not affect the command line executable crunch.

#30 was not fully addressed as intended in the v2.0.2 release. As of v2.0.2, images on paths that include spaces within the path at more than one directory level will not be optimized. Fix in the works and will be available as part of the v2.1.0 release #46

Workaround: remove spaces in the absolute path to your image file(s).

cc:@masey9

Bump pngquant to v2.12.0

Improved speed on large image files

TODO:

  • update compile script
  • update embedded macOS GUI binary

Update README.md to show percentage of memory saved

For each of the demo pictures in README.md, it might be useful to show the percentage of memory saved by using Crunch's optimizations alongside the Original/Optimized Size and DSSIM similarity score.

Memory saved = (Original_Size - Optimized_Size) / Original_Size

Weird installer

Is it expected that make build-dependencies should produce hundreds of pages like this:

image

...and then create these 2 folders in the user folder:

image

Add option to overwrite original

Normally I want just to compress the original exported assets so would be nice to have an "overwrite original" option

Thanks for the great work 👍

Auto-update (or update notification) for GUI

First, great work on the app!

It would be great to see an auto-update feature added to the GUI. If that's more work than you care to take on, a simple notification that an update is available when the app is launched would be sufficient.

Thanks!


@chrissimpkins edits below:

Current approach for auto-updates of macOS GUI application is through Homebrew cask with the following command after a previous install:

$ brew cask upgrade

This checks for a new version c/w your currently installed version and automatically upgrades if a more current release is available. The Homebrew installation approach remains the recommended approach for the macOS GUI tool in this project.

See #49 (comment) for an approach to upgrades if you do not have Homebrew installed on your macOS system.

crunch2 app exists with same application name

crunch2.com
now https://getcrunch.co

"If you like writing Less instead of CSS, you shouldn’t have to run scripts in your terminal like this is 1992, or install apps that do nothing except babysit your style files.

Crunch lets you write Less, Sass, CoffeeScript, Markdown*, and then automatically saves CSS, JavaScript, and HTML after you’ve made changes. Want to write just plain CSS? XML? Haskell? MUSHCode? Crunch lets you do that too.

Crunch 2 is an editor that lets you do what you want. Because Crunch loves you."

Issues with filenames containing spaces/special characters

I just testes Crunch with a file named MILITARY 2016-04-10 15.47.11.png (a screenshot from the console game Military Madness). Stage 1 worked somehow, Stage 2 did not at all:

• • • Crunching /Users/[REDACTED]/MILITARY 2016-04-10 15.47.11.png...

Original size (kB):     471.940

==> Running stage 1 optimizations...
stat: /Users/[REDACTED]/MILITARY 2016-04-10 15-crunch.png: stat: No such file or directory

(standard_in) 1: parse error
Current size (kB):  0.000

==> Running stage 2 optimizations...
==> Hold tight.  This could take awhile.
==> Click Cancel at any time to save at the above size.
[ERROR] Unable to access the file for optimizations.  Please report this issue.
stat: /Users/[REDACTED]/MILITARY 2016-04-10 15-crunch.png: stat: No such file or directory

---
Optimized filepath: /Users/[REDACTED]/MILITARY 2016-04-10 15-crunch.png
(standard_in) 1: parse error
Final size  (kB):   0.000
(standard_in) 1: parse error
Percent original:   0.00%
(standard_in) 1: parse error
Space saved (kB):   0.000

---

macOS GUI fails with space in absolute filepath [FIX AVAILABLE FOR TESTING]

I noticed this evening that Crunch will only execute successfully when I drag in PNG files from my Mac desktop into the GUI. If I drag them in from a folder on the desktop (eg. desktop/folder/image.png) then crunching fails to execute.


@chrissimpkins edits below:

Fix available for testing in #38 for anyone who is affected by this issue. Please weigh in on whether this fixes it for you in this thread. Thanks.

Updated GUI animations

Here are some updated animations for the GUI version of "Drag and Drop"

There are 5 states outlined as follows:

01-Load-Up.gif
This should play once and then switch to "Waiting"

02-Waiting.gif
This will loop and wait until the user places file(s) onto the GUI window

03-Crunching.gif
This will loop while the magic is happening

04-Error.gif
This will play once when something went Wrong (error)

04-Success.gif
This will play once when the compression is complete and state in view for 1-2 secs then reset back to "Waiting GIF".

Dimensions of animations are 600x300 - these would look best filling the entire container it sits in.

Open to suggestions on wording and visuals displayed here.

01-load-up
02-waiting
03-crunching
04-error
04-success


@chrissimpkins edits below:

TODO:

  • window size increase vs. image size decrease (vs. existing window design) - keep existing size
  • decide license for these images - MIT license, no change #39 (comment)
  • submit PR with images placed in img directory
  • update animations in Crunch macOS GUI tool
  • release the new success/failure status indicator animations with new logging of failures (#37)
  • update About window text with acknowledgment
  • update README documentation with acknowledgment
  • update macOS GUI Usage documentation animated gif image with new design

Dependency build failures due to Sourceforge libpng download interruption

Test builds of the pngquant and zopflipng dependencies just began failing today with the following error during the attempt to build pngquant:

xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
src/install-dependencies.sh: 46: cd: can't cd to libpng-1.6.34
make: *** [build-dependencies] Error 1

This occurs when you build these dependencies with make build-dependencies in order to use the command line executable.

This is happening because the Sourceforge file server is down and the libpng source code download is not accessible. libpng is a requirement for pngquant builds. You can check on availability with the following download link: https://download.sourceforge.net/libpng/libpng-1.6.34.tar.xz

When the source pulled through that link is available, this error should disappear.

This error does not apply to the macOS GUI or macOS right click menu service.

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.