[RESOLVED] How to set numPixels ?

“filter.pixelate”

  • numPixels default = 4,

I can’t seem to figure out how to set the numPixels value of pixelate. I have pixelate working just fine but no idea how to change the value.
 

local image = display.newImage(“images/pic.jpg”)
image.fill.numPixels = 8
image.fill.effect = “filter.pixelate”

I’ve tried that but that didn’t work. The documentation doesn’t give any insight on how to change the values.

I’ve not looked at it for a while, but this might work:

image.fill.effect.numPixels = 8

yes, its like rakoonic says. you forgot the effect bit.

the code:

local image = display.newImage(“images/pic.jpg”)

image1.fill.effect = “filter.pixelate”

image1.fill.effect.numPixels = 9

should work.

I swear I tried that :D. Thanks for the help. Do you guys know if it’s possible to add more then 1 effect to the same image?

I’ve not looked at it for a while, but this might work:

image.fill.effect.numPixels = 8

yes, its like rakoonic says. you forgot the effect bit.

the code:

local image = display.newImage(“images/pic.jpg”)

image1.fill.effect = “filter.pixelate”

image1.fill.effect.numPixels = 9

should work.

I swear I tried that :D. Thanks for the help. Do you guys know if it’s possible to add more then 1 effect to the same image?