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

Wrong image-size representation

Posted by Dean on Jul 02, 2008

I am using the following script:

---

size(613, 858)
# the canvas is 613 X 858 pixels
print WIDTH # prints 613
print HEIGHT # prints 858

image("images/LargeNFRepos.jpg", 0, 0)

c2 = color(1, 0, 0)
fill(c2)
oval(117, 230, 10, 10)

---

The actual size of the background image used is 613w x 858h. The expectation is that it will appear whole on the canvas. However, the image is drawn as 709w x 993h, and the result is that part of the right and bottom section of the image is cropped off.

Is this a bug or is my code faulty?


 
Posted by Tom De Smedt on Jul 10, 2008

Hi Dean,

None of both, it will have something to do with the image. What's the resolution of the image? Please mail it to me so I can have a look at it.