Code Monkey home page Code Monkey logo

thumby-grayscale's People

Contributors

altheawesomeguy avatar doogle avatar fuglaro avatar timendus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

thumby-grayscale's Issues

New thumby doesn't work with the grayscale library

I got a thumby a couple weeks ago and when using the grayscale library, the image either flickers between two positions, or is just monochrome. It gives different results randomly, so I think it's a timing issue.

Crash when switching between grayscale and black and white

Observable in the BrightnessTest

MicroPython v1.19.1 on 2022-06-18; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> 
Traceback (most recent call last):
  File "<stdin>", line 49, in <module>
  File "thumbyGrayscale.py", line 401, in disableGrayscale
  File "thumbyGrayscale.py", line 320, in init_display
TypeError: 'type' object isn't subscriptable
>
------------------------------------------------------

Sprite x and y should support floats in drawSprite for compatibility with thumbyGraphics

thumbyGraphics:

    def drawSprite(self, s):
        self.blit(s.bitmap, int(s.x), int(s.y), s.width, s.height, s.key, s.mirrorX, s.mirrorY)

thumbyGrayscale:

    @micropython.native
    def drawSprite(self, s):
        self.blit(s.bitmap, s.x, s.y, s.width, s.height, s.key, s.mirrorX, s.mirrorY)

Thanks to Demod#0001 for finding this issue.

thumbyGrayscale should be a drop-in equivalent to thumbyGraphics but it also good to allow for the floats as Demod puts it: "I think the API should keep supporting float for x and y, in case in the future someone adds anti-aliasing or something like that". No doubt anti-aliasing would rock when you are working at 0.007K resolution! :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.