eugeneware/jpeg-js — pull request #8 by petli (2014-12-09 10:16:54+00:00)
Title: Use copyToImageData to get the data to handle non-RGB color models

The new test case is a greyscale JPEG image which decode() didn't handle properly. Fixed by using the method provided by jpgjs itself to get RGBA data. As a bonus, this should also handle CMYK images.