bitmap import
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 !
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
Support Staff 1 Posted by lievenmenschaer... on 29 Jan, 2014 08:39 AM
hi,
Doing things like this is possible, you just need to import some python code through
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 Posted by olive on 29 Jan, 2014 09:38 PM
Great!!
thanks for that . I'll try it soon.
Cheers
3 Posted by olive on 30 Jan, 2014 08:53 PM
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
Support Staff 4 Posted by Frederik De Ble... on 05 Feb, 2014 09:23 AM
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 Posted by Olivier on 05 Feb, 2014 04:50 PM
That's great!
Thanks for that explanation.
Cheers
/olivier
Frederik De Bleser closed this discussion on 07 Feb, 2014 08:43 AM.