开发者

changing the color of the particular part of an image by using as3

I have to change开发者_C百科 the color of the particular part of an image dynamically without affecting the image design. Any idea how to do this?

I want to change the color like this

http://www.bmw.com/com/en/newvehicles/3series/sedan/2008/visualizer.html

Thanks in advance.


In example you provided there is no color manipulation on the picture. Every time you change the color — new .swf asset with car loaded into the app(example). in my opinion that's the easiest way to solve problem like this.

On other hand, if you really want to manipulate color channels of particular image, the ColorMatrix Class by Quasimondo is in my opinion the best tool to do this. The tricky(hardest, maybe in some cases impossible) part here will be to select particular part of the picture were you need to convert colors.

Update

the idea is that, you load your app, withh .swf asset only for the default color, and when user choose any other color you simply download additional .swf asset.

As for the second approach with color manipulation, I'm thinking, if you need this only for already predefined pictures, that you can cut out part of your picture which you want to manipulate, and convert it to .png with transparent background, and put it on top of your original picture. So you will have something that looks like original pic, but in reality it's to separated layers: one is your unchangeable part of the image, and other is the part that you want to manipulate. Here is the example with unicorns(because everybody love unicorns):

changing the color of the particular part of an image by using as3

Now you can use ColorMatrix to manipulate color channels of unicorn, and all other parts of your picture will be unchangeable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜