| View previous topic :: View next topic |
| Author |
Message |
Julu Julu
Joined: 01 Nov 2005 Posts: 9 Location: Germany
|
Posted: Thu Dec 01, 2005 4:13 pm Post subject: color = image:pixel(x,y) to array ? |
|
|
Hi,
i have an Array.
| Code: |
a = {}
for i=0,10 do
color = image:pixel(x,y)
newColor= color:colors()
a[i] = newColor ???
end
|
How can i copy getColor to the array? |
|
| Back to top |
|
 |
alexis
Joined: 14 Nov 2005 Posts: 11 Location: between neptune and mars
|
Posted: Fri Dec 02, 2005 6:55 am Post subject: |
|
|
I'm not sure to understand clearely the point but probabely somethink like
| Code: |
c=image:pixel(x,y):colors()
a[i]=Color:new(c.r, c.g, c.b)
|
could help you to construct a copy of the Color instance you get with pixel method.
Regards.
Alexis. _________________ Ho no ... !! I make the same bug again !!! |
|
| Back to top |
|
 |
alexis
Joined: 14 Nov 2005 Posts: 11 Location: between neptune and mars
|
Posted: Fri Dec 02, 2005 7:04 am Post subject: |
|
|
Or do you mean
| Code: |
c=image:pixel(x,y):colors()
a[1]=c.r
a[2]=c.g
a[3]=c.b
|
???? _________________ Ho no ... !! I make the same bug again !!! |
|
| Back to top |
|
 |
Julu Julu
Joined: 01 Nov 2005 Posts: 9 Location: Germany
|
Posted: Sat Dec 03, 2005 5:45 am Post subject: |
|
|
Thanks alexis.
The first Code is exactly which I searched |
|
| Back to top |
|
 |
|