I want to accomplish the following task in Flash CS开发者_如何学Go5 using AS3 but I can't seem to get the idea.
I have a set of around 100 pictures of bed rooms and dining rooms. What I want is user can pick a color and paint the walls. For ex: this one http://www.digital-photography-school.com/changing-color-in-photoshop
The tricky part here for me is to paint the walls with accurate color yet preserving the texture.
How can I do this. Any help or idea or some light will be much appreciated.
Regards, Mr. Kattel
Pretty much already covered. You need a masked layer on each image, and use the following tutorial to make a pallet of colours you can provide. http://www.kirupa.com/developer/actionscript/color.htm Then you create a frame for each image, and repeat the masking process to your liking. You might need to photoshoip the walls white in each photo so that there is a more natural lighting setup in each prodused photo. I found that my customers responded well to a print button with a colour ref at the bottom so I could replicate perfectly.
Kind Regards,
Peter
I can think of two ways to do this, use Pixel Bender, which will allow the use of custom photoshop-like filters in flash, or just use the tint in flash. In either case you'll likely need to create a mask of some sort for each image, masking out the walls. If you're doing this in a commercial application, you'll likely want as much control over the result as possible, so I would advise against trying to detect the color of the walls automatically.
http://www.adobe.com/devnet/pixelbender.html
You would likely need to manually clip out each wall section of each photo to use as a blending layer. You'll probably need to play around with BlendMode to get the right look. But it would certainly maintain texture information. I would try setting the tint value of the clip, and then use the clip as the blend source. You can probably achieve a similar effect with PixelBender, but I agree with the above answer - programmatically detecting the walls of a 100 different photos is inadvisable.
cheers
精彩评论