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

image scaling?

Posted by andrea on Apr 21, 2008



Hi...

now, if I set width or height in image, it's all ok.
If I set both, I would expect to have the image stretched to width x height.

image("/uni/pollenzo/slides/04.organization/img/whiteRabbit.jpg", 0, 0, 100)
translate(0, 200)
image("/uni/pollenzo/slides/04.organization/img/whiteRabbit.jpg", 0, 0, 100, 50)
translate(0, 100)
image("/uni/pollenzo/slides/04.organization/img/whiteRabbit.jpg", 0, 0, 100, 650)
But the result seems a bit strange...
?

Thanks for the help

Best
-a-


 
Posted by anonymous on Apr 22, 2008

The width and height parameters are the maximum size, so if you want to perform uneven scaling, use the scale() command.