Skip to content

Commit

Permalink
Merge branch 'dev' into master-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissimpkins committed Jun 4, 2018
2 parents a7425ee + 4030331 commit fc885d6
Show file tree
Hide file tree
Showing 60 changed files with 613 additions and 160 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Steps to reproduce the behavior:
**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
**Screenshots and/or Log Text**
If applicable, add screenshots to help explain your problem. For macOS GUI and macOS right-click menu service problems, please copy and paste the text from the log file `~/.crunch/crunch.log` into your bug report (requires Crunch v3.0.0 or higher).

**Desktop (please complete the following information):**
- OS: [e.g. macOS]
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
## Changelog

### v3.0.0

- improved quality of pngquant quantization of PNG images across all file sizes
- upgraded embedded pngquant to v2.12.0 (includes reduced pngquant optimization times)
- converted to custom build of zopflipng that is modified for use in the Crunch applications (forked from google/zopfli at git tag zopfli-1.0.2) at git version tag v2.1.0 (source repository is chrissimpkins/zopfli)
- improved zopfli compression ratios for post-quantized and non-quantized in-file sizes under 350kB. Many files are ~33% original file size after they are quantized with pngquant so this affects pre-optimization files up to just over ~1MB in size when the pngquant step is completed (the quantize step yields a modified image binary when it does not lead to larger file size or image quality below Crunch project thresholds, when this does not occur the original file at the original file size is used as the in-file to zopflipng)
- improved zopfli compression speed for post-quantized and non-quantized in-file sizes over 750kB
- eliminate optional PNG chunks by default in all files (reduces file size)
- converted to use of PNG filter = 0 for zopflipng compression of all quantized files (increases compression speed)
- use automated detection of best PNG filter for zopfli compression in all non-quantized files (improves compression)
- remove hidden colors behind alpha channel 0 in files that are not quantized due to low quality or increased file size following pngquant runs
- added new macOS GUI animations with success and fail indicators (thanks Gary Jacobs!)
- added logging of compression data and errors in macOS GUI and macOS right-click menu service tools in a new log file that is generated on the path `~/.crunch/crunch.log`
- updated redirect to /dev/null in install-dependencies.sh compile script for POSIX compliance
- refactored command line option parsing code (thanks Chris Clauss!)
- added new bug reporting template

### v2.1.0

- added automated detection of png image types through read of PNG file signatures
Expand Down
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ Select one or more PNG images in the Finder, right-click, and select the `Servic

## Examples

The following examples demonstrate the benefits and disadvantages of the current iteration of Crunch's aggressive space saving optimization strategy. In many cases, the PNG optimization minimizes file size with an imperceptible decrease in image quality. In some cases, degradation of image quality is visible. For example, view the horizon line + clouds in the prairie photo below for a demonstration of the introduction of undesirable image artifacts in the image. Experiment with the image types that you use and please submit a report with examples of any images where the image quality falls short of expectations for production-ready files.
The following examples demonstrate the benefits and disadvantages of the current iteration of Crunch's aggressive space saving optimization strategy. In many cases, the PNG optimization minimizes file size with an imperceptible decrease in image quality. In some cases, degradation of image quality is visible. View the horizon line in the prairie photo below for a demonstration of an undesirable artifact that is introduced with image processing. Experiment with the image types that you use and please submit a report with examples of any images where the image quality falls short of expectations for production-ready files.

## Photography Examples

### Cat Image

- Original Size: 583,398 bytes
- Optimized Size: 195,430 bytes
- DSSIM similarity score: 0.001504
- Percent original size: 33.50%
- Optimized Size: 196,085 bytes
- DSSIM similarity score: 0.001471
- Percent original size: 33.61%

##### Original

Expand All @@ -72,9 +72,9 @@ The following examples demonstrate the benefits and disadvantages of the current
### Sun's Rays

- Original Size: 138,272
- Optimized Size: 64,982
- DSSIM similarity score: 0.000913
- Percent original size: 47.00%
- Optimized Size: 66,593
- DSSIM similarity score: 0.000948
- Percent original size: 48.16%

##### Original

Expand All @@ -88,7 +88,7 @@ The following examples demonstrate the benefits and disadvantages of the current
### Prairie Image

- Original Size: 196,794 bytes
- Optimized Size: 77,968 bytes
- Optimized Size: 77,965 bytes
- DSSIM similarity score: 0.002988
- Percent original size: 39.62%

Expand All @@ -107,9 +107,9 @@ The following examples demonstrate the benefits and disadvantages of the current
### Robot Image

- Original Size: 197,193 bytes
- Optimized Size: 67,773 bytes
- DSSIM similarity score: 0.000163
- Percent original size: 34.37%
- Optimized Size: 67,596 bytes
- DSSIM similarity score: 0.000162
- Percent original size: 34.28%

##### Original

Expand All @@ -122,9 +122,9 @@ The following examples demonstrate the benefits and disadvantages of the current
### Color Circle Image

- Original Size: 249,251 bytes
- Optimized Size: 67,326 bytes
- DSSIM similarity score: 0.002503
- Percent original size: 27.01%
- Optimized Size: 67,135 bytes
- DSSIM similarity score: 0.002491
- Percent original size: 26.93%

##### Original

Expand All @@ -138,9 +138,9 @@ The following examples demonstrate the benefits and disadvantages of the current
### Flowers Image

- Original Size: 440,126 bytes
- Optimized Size: 196,979 bytes
- DSSIM similarity score: 0.000481
- Percent original size: 44.76%
- Optimized Size: 196,962 bytes
- DSSIM similarity score: 0.000480
- Percent original size: 44.75%

##### Original

Expand All @@ -164,7 +164,7 @@ Crunch is licensed under the [MIT license](https://github.com/chrissimpkins/Crun

pngquant is licensed under the [Gnu General Public License, version 3](https://github.com/pornel/pngquant/blob/master/COPYRIGHT). The pngquant source code is available [here](https://github.com/pornel/pngquant).

zopflipng is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). The zopflipng source code is available [here](https://github.com/google/zopfli).
zopflipng is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). The upstream zopflipng source code is available [here](https://github.com/google/zopfli). The source for the modified zopflipng fork that is used in this project is available [here](https://github.com/chrissimpkins/zopfli).

See the [LICENSE.md](LICENSE.md) document for details and additional licensing information for this project.

Expand All @@ -178,3 +178,5 @@ Crunch is a simple tool that makes excellent, free, open source software built b

- Lode Vandevenne, Jyrki Alakuijala, and the [zopfli project contributors](https://github.com/google/zopfli/graphs/contributors)
- Kornel Lesiński and the [pngquant project contributors](https://github.com/kornelski/pngquant/graphs/contributors)

The fantastic macOS GUI animations were designed by [Gary Jacobs](https://github.com/garyjacobs).
Binary file modified bin/Crunch.app/Contents/Info.plist
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/Crunch.app/Contents/Resources/04-Error@2x.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion bin/Crunch.app/Contents/Resources/Credits.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h3 style="color:#000;">Upgrade</h3>
</p>
<p>To upgrade with Homebrew, enter the following command in your terminal:</p>
<p>
<code style="font-family:Monaco,monospace;padding-left:10px;">$ brew cask uninstall crunch && brew cask install crunch</code>
<code style="font-family:Monaco,monospace;padding-left:10px;">$ brew cask upgrade</code>
</p>

<h3 style="color:#000;">Other Crunch Tools</h3>
Expand Down Expand Up @@ -57,4 +57,8 @@ <h3 style="color:#000;">Embedded Software Licenses</h3>

</li>
</ul>
<p></p>
<h3 style="color:#000;">Animations</h3>
<p>The Crunch GUI animations were designed by
<a href="https://github.com/garyjacobs" style="text-decoration: none;"><b>Gary Jacobs</b></a> and are licensed under the MIT License.</p>
</div>
1 change: 1 addition & 0 deletions bin/Crunch.app/Contents/Resources/clear.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
body,
html {
overflow: hidden;
background-color: #424242;
}

.clear {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,21 @@
body,
html {
overflow: hidden;
background-color: #FFF;
background-color: #424242;
}

.frame {
height: 200px;
white-space: nowrap;
text-align: center;
}

img {
margin-top: 50px;
}
</style>
</head>

<body>
<!-- page content -->
<div class="frame">
<span class="helper"></span>
<img src="slowdots.gif" height=100>
<img src="04-Error@2x.gif" height="190" width="390">
</div>
</body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,21 @@
body,
html {
overflow: hidden;
background-color: #FFF;
background-color: #424242;
}

.frame {
height: 200px;
white-space: nowrap;
text-align: center;
}

img {
margin-top: 50px;
}
</style>
</head>

<body>
<!-- page content -->
<div class="frame">
<span class="helper"></span>
<img src="slowdots.gif" height=100>
<img src="04-Success@2x.gif" height="190" width="390">
</div>
</body>

Expand Down
Loading

0 comments on commit fc885d6

Please sign in to comment.