1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Pixel Processing

Posted by Mark on Mar 26, 2007

I've been digging around to see if there is a way to manipulate pixels or to draw pixels manually on the nodebox canvas. I thought coreimage would help me out here, but although it allows one to get at RGB values , it seems there is no way currently to set them. I've been digging around the source code, but still don't understand the architecture of nodebox enough to easily hack my way to this. Before I really roll up my sleeves, I want to make sure I haven't just missed this somewhere or confirm that this is not a feature at the moment. If not, do you have any pointers where someone with some knowledge of python and the apple libraries might begin to to build a custom solution? Thanks.



Posted by Tom De Smedt on Mar 27, 2007

Core Image doesn't currently have a way to set pixels (because of Cocoa's underlying architecture - it would involve constructing a new NSImage from the updated pixels array I think - this would probably be a time-intensive process).

However, the PhotoBot library has a way to manipulate pixels. Have a look at:
http://nodebox.net/code/index.php/photobot.Layer.pixels[]