bitmap import

olive's Avatar


26 Jan, 2014 02:03 PM

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

  1. Support Staff 1 Posted by lievenmenschaer... on 29 Jan, 2014 08:39 AM

    lievenmenschaert's Avatar


    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.


  2. 2 Posted by olive on 29 Jan, 2014 09:38 PM

    olive's Avatar

    thanks for that . I'll try it soon.

  3. 3 Posted by olive on 30 Jan, 2014 08:53 PM

    olive's Avatar

    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?

  4. Support Staff 4 Posted by Frederik De Ble... on 05 Feb, 2014 09:23 AM

    Frederik De Bleser's Avatar

    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.

  5. 5 Posted by Olivier on 05 Feb, 2014 04:50 PM

    Olivier's Avatar

    That's great!
    Thanks for that explanation.

  6. Frederik De Bleser closed this discussion on 07 Feb, 2014 08:43 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

25 May, 2024 11:52 AM
24 May, 2024 07:39 AM
16 May, 2024 02:11 AM
16 May, 2024 01:58 AM
14 May, 2024 01:29 AM


13 May, 2024 12:36 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM
03 May, 2024 12:30 AM
03 May, 2024 12:09 AM