Is there a way to tint an image?

Hi folks,

is there a way to tint an image that was loaded via display.newImage? I think when I use object:setFillColor, the image disappears.

Michael

http://www.whiteskygames.com
http://twitter.com/mhartlef

Bitmap manipulation is not supported yet in current betas.

It's not bitmap manipulation I am after but more to set the vertex color for an image. Easy in Opengl to do.

Could you overlay the image with a newRect object and tweak the alpha value to get the color effect you want?

Tom

Sure Tom, that would be a workaround for a few images and these have to be images that use the full rectangle, means no alpha values. Then you can do that.

I use tinting a lot with particles in another language.

Anyway, your workaround is not really a solution for something like corona when you have a lot of objects performance wise or when the underlaying image has alpha values.

I would also required a solution for this situation - perhaps it would be more of a "feature request" post, since there doesn't seem to be any workaround.

I'm working on a sport game, and I want players to be able to customize their team, so unless I split up every image in layers of the parts I want customize, create an image in each color I want them to use, and then layer them all up... which is a completely idiotic solution, I can't do it.

If I could use a Rectangle to tint the image (the old alpha trick), but with image masking, or if I could apply a tint to only the non-transparent part of an image, it could work. But right now that's not an option.

Of course the best solution would be complete palette control. But that's a long shot.

I just jump in here to say that I would need that too badly... together with real masking support.

Bumping this as it is also very important for a project. This has been available in Appcelerator's Titanium, but the performance is poor.

Bumping this, too. I am working with Corona for a short time now, and although I really like it, the features I missed immediately from the beginning is really basic stuff like

- Tinting images
- Blend modes

It's really hard to create a decent looking game without these features, so I hope there will be an official statement soon if this is planned to be added at least. My trial period ends in two weeks, and I'll have to take the lack of these features into account then :-(

Tinting is essential for me too...

I am going to use many sprites of the same shape - different color in my game. Without tinting it is going to be a huge waste of texture memory.

I shall bump this. Could we please have this added? It would be very helpful to lots of people.

Once more unto the "bump" dear friends - given that it's such core feature I'd like to see it added as well - it'd be really great to be able to use this to recolour bitmap fonts as well.

Jon...

Bump on this. I really really need this as well.

views:1454 update:2011/9/30 9:15:39
corona forums © 2003-2011