We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › img.width and img.height
Page Index Toggle Pages: 1
img.width and img.height (Read 706 times)
img.width and img.height
Oct 19th, 2009, 5:49am
 
how does img.width work?
I am using
"img.width = img.width -1 " statement to decrease the size of the image in setup function but instead it skews the image and also i think it is taking the pixel value and not the number in consideration. Please explain....
Re: img.width and img.height
Reply #1 - Oct 19th, 2009, 6:08am
 
You are not supposed to change this value yourself. Consider it as a constant, even if it is not enforced.
Use image() width & height parameters if you want to display it at a different scale.
Use get() with same parameters if you really want an image of different size.
Page Index Toggle Pages: 1