android - Green Screen effect on ImageView -
my goal have "green screen" effect imageview , border. have png border thick solid outline, shape irregular, , transparent both inside , outside border. want use border of image, photo, , because border shape irregular, parts of photo may lie outside of border.
all contraption sits @ center of layout complex gradient background, cannot cheat border imageview , fill outside part color similar underlying parent background.
my initial idea use image editing tool fill inside , outside of png different colors (green inside, black outside), place image behind it, , perform pixel magic resulting bitmap such black pixels outside border "punch through" whole canvas showing parent background (the complex gradient background), , green pixels inside border become transparent , reveal photo behind it.
this sounds complicated simple-looking goal i'm postponing implementation (not sure if it's possible) until i'm convinced that:
a. there no existing library can use same effect
b. there better solution results same effect, lot less complex.
try using colorfilter that: http://developer.android.com/intl/es/reference/android/graphics/colorfilter.html
in discussion should find want: applying colorfilter imageview shapeddrawable
Comments
Post a Comment