You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a DrawTarget adapter is added it would also be possible to add an ImageDrawable wrapper, which internally uses the new DrawTarget adapter:
let image_1bpp = ImageRaw::<BinaryColor>::new(...);let transparent_image = TransparentImage::new(image_1bpp,Rgb565::RED);// transparent_image implements ImageDrawable<Color = Rgb565>// and can be used like any other imageImage::new(&transparent_image,Point::zero()).draw(&mut display);
The text was updated successfully, but these errors were encountered:
This issue came up on the Matrix channel: It isn't currently easy to draw a 1 BPP image where the image data is used as an on-off alpha channel.
This feature could be implemented by the user, if images are providing a pixel iterator (see #609). But a more flexible solution would be to implement a
DrawTarget
adapter, which would work with allImageDrawable
s and is already used byMonoFont
: https://github.com/embedded-graphics/embedded-graphics/blob/master/src/mono_font/draw_target.rsWhen a
DrawTarget
adapter is added it would also be possible to add anImageDrawable
wrapper, which internally uses the newDrawTarget
adapter:The text was updated successfully, but these errors were encountered: