#cocoa #image #rgba #load-image


Read RGBA image using macOS Cocoa API

7 releases (stable)

1.0.4 Aug 26, 2020
1.0.2 Apr 13, 2020
1.0.1 Jul 21, 2019
1.0.0 May 28, 2018
0.1.1 Nov 10, 2017

37 downloads per month
Used in cavif

CC0 license

103 lines

Load image in Rust using Cocoa decoders

Allows reading any image format that macOS supports natively, in Rust.

Returns an RGBA 8-bit bitmap in sRGB color space with premultiplied alpha.

Links with AppKit.framework. Compiles to nothing on other platforms (just gracefully always returns an error).


This is based on ImgRef and RGB crates.