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

Export Multiple Canvas/Jpg

Posted by Lucky on Feb 14, 2011

Hi I just discovered coreimage and love it. My question is if and if yes how I can export multiple images. E.g. my script generates random versions of a rectangle and every version will be exported to a jpg or a multipage pdf. How can I achieve this? With multiple canvases?

Thanks for your time!


 
Posted by Trumpetto on Feb 14, 2011

size(200, 200)
background(None)
 
for items in range(10):
    canvas.clear() 
 
    fill(0)
    rect(items*4, items*4, 40, 40)
    canvas.save(str(items) + ".png")
Or you can use the "Number of Pages" option from the export dialog.



Posted by Trumpetto on Feb 14, 2011

sorry, should be ".jpg"



Posted by lucky on Feb 14, 2011

muchas gracias!!