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 7683627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:50:15+00:00 2026-05-31T18:50:15+00:00

Does anyone have an idea, link, library, source code, … on how to convert

  • 0

Does anyone have an idea, link, library, source code, … on how to convert photo’s and images (bitmaps) to sketchy-like pictures? I can’t find any good sources on how to do it.

I found this link How to cartoon-ify an image programmatically? about how to cartoon-ify a image programmatically, but i prefer to make it image-to-sketch one.

I want to make an android app that can programmatically “convert” JPEG photo’s to sketchy images.

  • 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-31T18:50:16+00:00Added an answer on May 31, 2026 at 6:50 pm

    Ok, so i found my own answer using different techniques like Mark told me.
    I use the following pseudocode:

    *s = Read-File-Into-Image("/path/to/image")
    *g = Convert-To-Gray-Scale(s)
    *i = Invert-Colors(g)
    *b = Apply-Gaussian-Blur(i)
    *result = Color-Dodge-Blend-Merge(b,g)
    

    The first four methods were easily to find on the internet, however on the last one I couldn’t find a lot of information, not even source code. So I searched on how PS did it and found the following formula in c++:

    ((uint8)((B == 255) ? B:min(255, ((A << 8 ) / (255 - B)))))
    

    Then i converted it to Java with the following code:

    private int colordodge(int in1, int in2) {
        float image = (float)in2;
        float mask = (float)in1;
        return ((int) ((image == 255) ? image:Math.min(255, (((long)mask << 8 ) / (255 - image)))));
    
    }
    
    /**
     * Blends 2 bitmaps to one and adds the color dodge blend mode to it.
     */
    public Bitmap ColorDodgeBlend(Bitmap source, Bitmap layer) {
        Bitmap base = source.copy(Config.ARGB_8888, true);
        Bitmap blend = layer.copy(Config.ARGB_8888, false);
    
        IntBuffer buffBase = IntBuffer.allocate(base.getWidth() * base.getHeight());
        base.copyPixelsToBuffer(buffBase);
        buffBase.rewind();
    
        IntBuffer buffBlend = IntBuffer.allocate(blend.getWidth() * blend.getHeight());
        blend.copyPixelsToBuffer(buffBlend);
        buffBlend.rewind();
    
        IntBuffer buffOut = IntBuffer.allocate(base.getWidth() * base.getHeight());
        buffOut.rewind();
    
        while (buffOut.position() < buffOut.limit()) {
            int filterInt = buffBlend.get();
            int srcInt = buffBase.get();
    
            int redValueFilter = Color.red(filterInt);
            int greenValueFilter = Color.green(filterInt);
            int blueValueFilter = Color.blue(filterInt);
    
            int redValueSrc = Color.red(srcInt);
            int greenValueSrc = Color.green(srcInt);
            int blueValueSrc = Color.blue(srcInt);
    
            int redValueFinal = colordodge(redValueFilter, redValueSrc);
            int greenValueFinal = colordodge(greenValueFilter, greenValueSrc);
            int blueValueFinal = colordodge(blueValueFilter, blueValueSrc);
    
            int pixel = Color.argb(255, redValueFinal, greenValueFinal, blueValueFinal);
    
            buffOut.put(pixel);
        }
    
        buffOut.rewind();
    
        base.copyPixelsFromBuffer(buffOut);
        blend.recycle();
    
        return base;
    }
    

    If the code could be improved, please post a new answer or comment below. Thanks!

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

Sidebar

Related Questions

Does anyone have any idea if you can find source JARs on Maven repositories?
Does anyone have any idea what is wrong with this create statement for mysql?
Does anyone have an idea how can I fix this vulnerability in Apache 2.2.4
Does anyone have any idea how to change the thickness of the text pointer
Does anyone have an idea how to Print (A4) the Content of a ListView
Does anyone have any idea on how can you create a product filtering query
Does anyone have any idea when Microsoft might be dropping another Silverlight 4 public
Does anyone have any idea what this jQuery selector will do? object.find('td:eq(1) div div');
In datasets there was a method WriteXml or ReadXml Does anyone have any idea
This may be a doozy, but does anyone have an idea how to: Pass

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.