Support for 1bpp bitmap?

289 views
Skip to first unread message

Loïc Carrère

unread,
Dec 10, 2017, 11:33:17 AM12/10/17
to skia-discuss
Hello,

Does the library has internal support for 1bpp pixel format?

I know the SkColorType enumeration specifies this:

so I guess the answer is no but I would like to check if I am not missing something obvious. My goal is to be able to create and handle images from pixel buffer encoded in 1bit per pixel.

Thank you very much for any hint.

With best regards,

Loïc

Mike Reed

unread,
Dec 10, 2017, 8:03:10 PM12/10/17
to skia-d...@googlegroups.com
1bbp images are not supported, sorry. The closest thing is going to be kAlpha_8, which will draw in whatever color/shader is set on the SkPaint. Use 0xFF for "on" and 0x00 for off.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Loïc Carrère

unread,
Dec 22, 2017, 9:19:16 PM12/22/17
to skia-discuss
Thank you very much for the reply Mike. OK so I will handle bitonal image through this format.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages