When `gray_color_space` is `NULL`, it is passed into `CGBitmapContextCreate()`. Since there are no guarantees in https://developer.apple.com/documentation/coregraphics/1455939-cgbitmapcontextcreate?language=objc to what happens in that case, depending on the implementation there may be undefined behaviour.
= kitty - the fast, featureful, GPU based, terminal emulator See https://sw.kovidgoyal.net/kitty image:https://circleci.com/gh/kovidgoyal/kitty.svg?style=svg["Build status", link="https://circleci.com/gh/kovidgoyal/kitty"]
Languages
Python
43.6%
C
28.3%
Go
20%
Objective-C
6%
Shell
1.5%
Other
0.5%