The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

General DiscussionFrom the old forum

bitmap import

5 replies Last reply

  1. Hi!
    would it be possible to make an " bitmap analyzing" node via Python?
    (that would for example retrieves brightness of pixels at certain coordinates)
    Thanks !

    Copy link
  2. hi,

    Doing things like this is possible, you just need to import some python code through

    file >> code libraries.

    I've included a simple example that retrieves the red component and the location for a pixel and returns the value so it can be used in NB. Change the python code to retrieve other values..

    You also will have to make a new node which refers to the python file and function.

    regards,
    lieven

    Copy link
  3. Great!!
    thanks for that . I'll try it soon.
    Cheers

    Copy link
  4. Thanks again for this answer, it was more than what I was dreaming of and exactly what i needed!
    Now, I'm totally beginner at Python but I'm amazed that you could just import Java image libraries to do the job for Python. Is that a magic from Nodebox or is it always like that?
    Cheers,
    Olivier

    Copy link
  5. NodeBox team

    NodeBox is written in Java and uses Jython, a Python implementation in Java. Jython can access anything that the JVM has access to, including image libraries.

    Copy link
  6. That's great!
    Thanks for that explanation.
    Cheers
    /olivier

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply