Skip to content

Instantly share code, notes, and snippets.

@ksherlock
Created November 24, 2018 17:23
Show Gist options
  • Save ksherlock/2ef631b4c0994e41dacc9f8d9a664b15 to your computer and use it in GitHub Desktop.
Save ksherlock/2ef631b4c0994e41dacc9f8d9a664b15 to your computer and use it in GitHub Desktop.
Assertion failed: (0), function compress_data_to_8_bit, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreGraphics/CoreGraphics-1247.4.1/CoreGraphics/Images/CGImage.c, line 640.
OS X Mojave CGImageMaskCreate():
```
Assertion failed: (0), function compress_data_to_8_bit, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreGraphics/CoreGraphics-1247.4.1/CoreGraphics/Images/CGImage.c, line 640.
```
The issue seems to occur with 24-bit RGB images. 32-bit (RGBA) or 8 bit (greyscale) do not assert.
`pngcrush -noreduce -c [0|2|4|6] input.png output.png`
where c flag is:
0: greyscale, no alpha
2: true color, no alpha (do not use except to verify the above bug :)
4: greyscale, with alpha
6: true color, with alpha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment