Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6149347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:26:15+00:00 2026-05-23T19:26:15+00:00

I’m working on an android application, and I have a drawable that I’m loading

  • 0

I’m working on an android application, and I have a drawable that I’m loading up from a source image. On this image i want make a image blur and embross ,i have read How to change colors of a Drawable in Android?

can you give me some advice?thank you

edit:i have emboss an image,but i cannot blue an image,can you give me some blue

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:26:15+00:00Added an answer on May 23, 2026 at 7:26 pm
     public Bitmap fudiao(Bitmap bmpOriginal) {
        int width, height, r,g, b, c,a, gry,c1,a1,r1,g1,b1,red,green,blue; 
        height = bmpOriginal.getHeight(); 
        width = bmpOriginal.getWidth(); 
        int depth = 30;
    
          Bitmap bmpSephia = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
            Canvas canvas = new Canvas(bmpSephia);
            Paint paint = new Paint();
          //  ColorMatrix cm = new ColorMatrix();
          //  cm.setScale(.3f, .3f, .3f, 1.0f);   
          //  ColorMatrixColorFilter f = new ColorMatrixColorFilter(cm);
          //  paint.setColorFilter(f);
           canvas.drawBitmap(bmpOriginal, 0, 0, null);
            for(int y=1; y< height-1; y++) {
                for(int x=1; x < width-1; x++) {
                    c = bmpOriginal.getPixel(x, y);
    
                    r = Color.red(c);
                    g = Color.green(c);
                    b = Color.blue(c);
    
                    c1 = bmpOriginal.getPixel(x-1, y-1);
    
                    r1 = Color.red(c1);
                    g1 = Color.green(c1);
                    b1 = Color.blue(c1);
    
    
                    red = Math.max(67, Math.min(255, Math.abs(r - r1 + 128)));
                    green = Math.max(67, Math.min(255, Math.abs(g - g1 + 128)));
                    blue = Math.max(67, Math.min(255, Math.abs(b - b1 + 128))); 
                    if (red > 255)
                    {
                        red = 255;
                    }
                    else if (red < 0)
                    {
                        red = 0;
                    }
    
                    if (green > 255)
                    {
                        green = 255;
                    }
                    else if (green < 0)
                    {
                        green = 0;
                    }
    
                    if (blue > 255)
                    {
                        blue = 255;
                    }
                    else if (blue < 0)
                    {
                        blue = 0;
                    }
    
                   bmpSephia.setPixel(x, y, Color.rgb(red, green, blue));
                   // bmpSephia.setPixel(x, y, Color.argb(a1, red, green, blue));
                }
            }      
            return bmpSephia;
        }
    

    this only emboss a pic

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.