Android Í Ï ranñe' ríáíöö®GPUImage for Android

Source: Internet
Author: User

Android í¼ pañe' rírögpuimage for Android

GPUImage Ç çios Ï Â Ò» ö ö~~~~µ 'µä» Ó óúgpu µäí ~~a'***â £ ********************************* öö¸ ÷ ññáí ¼ ñ '************************************************************* juany» úµäµ μ Ê ± Â Ë µ μ £ £gpuimage for Android Ç çürúandroid Ï Â µäµ μ Ö ö£;í ñ N' ² Ç ª µ 'µä£;í *****úgithub É {£ ;;***********************************************

° 0000± 0000£° android-gpuimage-1.1.1


Android ä£äâ *********» ö§ Ö öopengl ES 2.0 ********************************** â Why?

Ò Ó Caused by: java. lang. IllegalStateException: OpenGL ES 2.0 is not supported on this phone.

(1) **************imageview
Xml maid

 

Java úâ examples
mImageView.setFilter(new GPUImageSepiaFilter()); // sepiamImageView.setFilter(new GPUImageGrayscaleFilter()); // graymImageView.setFilter(new GPUImageSharpenFilter()); // sharpmImageView.setFilter(new GPUImageSobelEdgeDetection()); // edge
Guíanga

Sepia ° ó£°


Gray ° ó£°



Sharp ° ó£°

Edge ° ó£°



(2) 'hangiáíassets öw.µähangä~~~< symbol · blank "http://www.bkjia.com/kf/ware/vc/" target = "_ blank" class = "keylink"> Fill = "brush: java; "> // *********** AssetManager as = getAssets (); InputStream is = null; Bitmap bitmap = null; try {is =. open ("dog.jpg"); bitmap = BitmapFactory. decodeStream (is); is. close ();} catch (IOException e) {Log. e ("MainActivity", "Error");} // Ê Ó Ã gpuimag' *********** GPUImage = new gpuImage (this); GPUImage. setImage (bitmap); gpuImage. setFilter (new GPUImageToonFilter (); bitmap = gpuImage. getBitmapWithFilterApplied (); // ~úimageview ö~~~~~~~'**°ómuläí ~~~n' ImageView view = new ImageView (this); view. setImageBitmap (bitmap); setContentView (view );
(3) Ê Ó Photoshop µäacv Î ä¼ þ
Java úâ examples
// ¶ÁȡͼÏñAssetManager as = getAssets();InputStream is = null;Bitmap bitmap = null;try {    is = as.open("dog.jpg");    bitmap = BitmapFactory.decodeStream(is);    is.close();} catch (IOException e) {    Log.e("MainActivity", "Error");}// ¶ÁÈ¡PhotoshopµÄacvÎļþGPUImageToneCurveFilter filter = new GPUImageToneCurveFilter();try {    is = as.open("tone_curve.acv");    filter.setFromCurveFileInputStream(is);    is.close();} catch (IOException e) {    Log.e("MainActivity", "Error");}// ʹÓÃGPUImage´¦ÀíͼÏñGPUImage gpuImage = new GPUImage(self);gpuImage.setImage(bitmap);gpuImage.setFilter(filter);bitmap = gpuImage.getBitmapWithFilterApplied();// ÔÚImageViewÖÐÏÔʾ´¦ÀíºóµÄͼÏñImageView view = new ImageView(self);view.setImageBitmap(bitmap);setContentView(view);




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.