bitmap import

olive's Avatar

olive

26 Jan, 2014 02:03 PM

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 !

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

    lievenmenschaert's Avatar

    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

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

    olive's Avatar

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

  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?
    Cheers,
    Olivier

  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.
    Cheers
    /olivier

  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

Generic

? 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

22 Nov, 2022 03:21 PM
22 Nov, 2022 10:40 AM
22 Nov, 2022 09:55 AM
20 Nov, 2022 12:06 PM
08 Nov, 2022 10:44 PM

 

05 Nov, 2022 08:40 AM
03 Nov, 2022 09:38 PM
24 Oct, 2022 11:32 AM
06 Oct, 2022 09:07 AM
05 Oct, 2022 02:22 AM
30 Sep, 2022 11:36 PM