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

06 Sep, 2023 07:20 AM
05 Sep, 2023 08:40 PM
30 Aug, 2023 03:16 AM
19 Aug, 2023 03:22 AM
29 Jul, 2023 05:52 AM

 

28 Jul, 2023 10:53 PM
23 Jul, 2023 07:04 AM
14 Jul, 2023 03:05 AM
07 Jul, 2023 06:26 AM
05 Jul, 2023 11:44 PM
30 Jun, 2023 12:48 PM