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
An amazing feature would be the ability to render a given image onto a dotmatrix. And to make things prettier some sort of dithering, be it Floyd-Steinberg or Atkinson or something else entirely, would also be nice.
Code
importdotmatrixasdmm=dm.Matrix(256, 256)
m.blit(
"path/to/my/image",
area=((63, 63), (191, 191)), # The area to blit the image to.dither=dm.dither.Floyd# The dithering algorithm to use.
)
print(m.render())
or
importdotmatrixasdmfromPILimportImagem=dm.Matrix(256, 256)
img=Image.open("path/to/my/image")
m.blit(
img,
area=((63, 63), (191, 191)), # The area to blit the image to.dither=dm.dither.Floyd# The dithering algorithm to use.
)
print(m.render())
The latter example usage would require pillow as dependency. Thus it might be sensible to block this feature behind an "import guard" and add pillow as an extra-install-option, àla dotmatrix[images].
The text was updated successfully, but these errors were encountered:
Description
An amazing feature would be the ability to render a given image onto a dotmatrix. And to make things prettier some sort of dithering, be it Floyd-Steinberg or Atkinson or something else entirely, would also be nice.
Code
or
Output
No response
Anything else?
Example: DotArt by Garrett Albright
The latter example usage would require pillow as dependency. Thus it might be sensible to block this feature behind an "import guard" and add pillow as an extra-install-option, àla
dotmatrix[images]
.The text was updated successfully, but these errors were encountered: