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

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 - Color picking from an Image

Color picking from an Image

Problems with Canvas, OpenGL, etc...

Color picking from an Image

Postby Cyberfreak » Thu Dec 22, 2011 12:19 pm

Hi Guys,
I am new to the android platform and I am urgently in need of some help in extracting colors from an image (preferably JPEG) and use the color for later process. Help me, Anybody Pls...
Cyberfreak
Freshman
Freshman
 
Posts: 2
Joined: Thu Dec 22, 2011 11:35 am

Top

Re: Color picking from an Image

Postby MichaelEGR » Thu Dec 22, 2011 2:59 pm

Load your image into a Bitmap and use the getPixels methods:
http://developer.android.com/reference/ ... Pixels(int[], int, int, int, int, int, int)

The integers grabbed can be used with Color. You can even convert to HSV from the various methods in the Color class.
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Re: Color picking from an Image

Postby Cyberfreak » Fri Dec 23, 2011 4:48 am

Thank you for the Immediate response . will try it today....
Cyberfreak
Freshman
Freshman
 
Posts: 2
Joined: Thu Dec 22, 2011 11:35 am

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests