Image: support for b/w images
lytico opened this issue · comments
/**
* A traditional bitmask with a 1 bit alpha value (on or off).
*/
Cairo.Format.A1
apple:
if compression is NSTIFFCompressionCCITTFAX3, then the data must be 1 bit per sample and 1 sample per pixel.
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/nsbitmapimagerep_Class/Reference/Reference.html
CGBitmapContextCreate
Creates a bitmap graphics context.
CGContextRef CGBitmapContextCreate (
void *data,
size_t width,
size_t height,
size_t bitsPerComponent,
size_t bytesPerRow,
CGColorSpaceRef colorspace,
CGBitmapInfo bitmapInfo
);
but 1 pixel format is not supported by Context:
https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/dq_context.html#//apple_ref/doc/uid/TP30001066-CH203-BCIBHHBB
http://stackoverflow.com/questions/13391379/create-monochrome-cgimageref-1-bit-per-pixel-bitmap
http://stackoverflow.com/questions/13305028/monomac-best-way-to-convert-bitmap-to-nsimage
http://docs.go-mono.com/?link=T%3aMonoMac.AppKit.NSBitmapImageRep%2f*
http://stackoverflow.com/questions/5841958/decode-values-ignored-in-cgcreateimage
http://iazapps.wordpress.com/2012/02/06/cifilter-filters-available-for-ios-5/