In may? it was mentioned that there would be a way to create grayscale versions of sprites with Graphics 2.0. Is there a standard way to do that? It isn’t immediately obvious to me with the new color system.
You could do it with the saturation filter set all the way down - but that is a visual trick rather than actually converting an image.
There is a grayscale filler. I’ll play around with the effects when I get the latest build (I had 1260 which had imageSheets broken for fills)
Hi @jack95,
I think he’s referring to the filter “desaturate” call. Should be something like this:
[lua]
image.fill.effect = “filter.desaturate”
image.fill.effect.intensity = 1
[/lua]
EDIT: the “filter.grayscale” should do the same thing, with one less line, but it has no parameters to partially desaturate like the first example (intensity between 0 and 1).
http://docs.coronalabs.com/guide/graphics/effects.html
Hope this helps,
Brent
You could do it with the saturation filter set all the way down - but that is a visual trick rather than actually converting an image.
There is a grayscale filler. I’ll play around with the effects when I get the latest build (I had 1260 which had imageSheets broken for fills)
Hi @jack95,
I think he’s referring to the filter “desaturate” call. Should be something like this:
[lua]
image.fill.effect = “filter.desaturate”
image.fill.effect.intensity = 1
[/lua]
EDIT: the “filter.grayscale” should do the same thing, with one less line, but it has no parameters to partially desaturate like the first example (intensity between 0 and 1).
http://docs.coronalabs.com/guide/graphics/effects.html
Hope this helps,
Brent