Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - ColorFilter to remove image backgrounds

ColorFilter to remove image backgrounds

Put your problem here if it does not fit any of the other categories.

ColorFilter to remove image backgrounds

Postby wfsaxton » Tue Mar 03, 2009 1:45 am

Hi all. Noob android programmer here!

I have some 2d character sprites that I would like to remove the background from...I was wondering if I could use the ColorFilter to do this.

Here is my first attempt:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Drawable d = mContext.getResources().getDrawable(R.drawable.queen);
  2.  
  3. d.setColorFilter(Color.parseColor("#585C38"), PorterDuff.Mode.DST_IN);
  4.  
  5. d.setBounds(0, 0, 100, 100);
  6.  
  7. d.draw(canvas);
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


But doesn't look like it does anything. I've tried all the other PorterDuff modes and they either show the image or the color, but they never look like they are "filtering" anything.

Any ideas?
wfsaxton
Freshman
Freshman
 
Posts: 3
Joined: Tue Mar 03, 2009 1:18 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 10 guests