Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can create a Gaussian-blurred bitmap with RenderScript’s ScriptIntrinsicBlur by supplying an input allocation, setting a radius in the range (0, 25], running the intrinsic into an output allocation, and copying the result back to a bitmap. That is a legacy approach: RenderScript was deprecated in API 31, so for new work choose a replacement based on whether you need a reusable bitmap or only a blur on a view.

Blur a bitmap with the legacy RenderScript intrinsic

ScriptIntrinsicBlur is Android’s RenderScript Gaussian-blur intrinsic. Android’s API reference says it was added in API 17 and deprecated in API 31. The Kotlin example below is for maintaining a project that still supports RenderScript; it is not the recommended starting point for a new graphics pipeline.

Use a compatible bitmap and radius

  • The intrinsic accepts Element.U8 or Element.U8_4. For an ARGB_8888 color bitmap, this example uses U8_4.
  • The radius must be greater than 0 and no more than 25. The documented default is 5.0, but the example sets the requested value explicitly.
  • The API reference does not guarantee that every bitmap configuration is accepted. Check the source bitmap’s configuration and mutability requirements for the app and the Android versions it supports.

Kotlin example

fun blurBitmap(context: Context, source: Bitmap, radius: Float): Bitmap {
    require(radius > 0f && radius <= 25f) { "radius must be in (0, 25]" }
    require(source.config == Bitmap.Config.ARGB_8888) {
        "This implementation expects an ARGB_8888 source bitmap"
    }

    val output = Bitmap.createBitmap(
        source.width,
        source.height,
        Bitmap.Config.ARGB_8888
    )

    var rs: RenderScript? = null
    var input: Allocation? = null
    var outputAllocation: Allocation? = null
    var blur: ScriptIntrinsicBlur? = null

    try {
        rs = RenderScript.create(context)
        input = Allocation.createFromBitmap(rs, source)
        outputAllocation = Allocation.createFromBitmap(rs, output)
        blur = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs))

        blur.setInput(input)
        blur.setRadius(radius)
        blur.forEach(outputAllocation)
        outputAllocation.copyTo(output)

        return output
    } finally {
        blur?.destroy()
        input?.destroy()
        outputAllocation?.destroy()
        rs?.destroy()
    }
}

The operation follows the intrinsic’s contract: create it with a RenderScript context and a supported element, bind the input allocation, set the radius, execute into a matching output allocation, then copy the result to the bitmap. The finally block releases the RenderScript objects even if an operation throws. Adapt the configuration check and allocation setup only after verifying that the target bitmap types are supported in the app.

What RenderScript’s deprecation means for an app

Android’s migration guide says RenderScript APIs are deprecated starting with Android Gradle Plugin 7.2. It says the APIs continue to function with warnings, that future AGP versions will no longer include RenderScript support, and that intrinsics may run on the CPU rather than the GPU. The warning is about possible behavior, not a guarantee that every existing blur immediately switches execution paths or stops working. Check the AGP and Android versions used by the project before planning a migration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Samsung Galaxy A16 4G LTE (128GB + 4GB) International Model SM-A165F/DS Factory Unlocked, 6.7", Dual SIM, 50MP Triple Camera (Case Bundle), Black
  • Please note, this device does not support E-SIM; This 4G model is compatible with all GSM networks worldwide outside of the U.S. In the US, ONLY compatible with T-Mobile and their MVNO's (Metro and Standup). It will NOT work with other CDMA carriers, and it is also not compatible with their MVNO (Visible, Xfinity Mobile, US Mobile, Cricket Wireless, etc).
  • Compatibility with certain third-party devices and accessibility accessories, including some hearing aids, may vary depending on manufacturer support, Bluetooth protocols, software compatibility, and regional firmware limitations. For additional hearing aid compatibility information, please refer to Samsung’s official support documentation.
  • Camera: 50 MP, f/1.8, (wide), 1/2.76", 0.64µm, AF | 50 MP, f/1.8, (wide), 1/2.76", 0.64µm, AF | 2 MP, f/2.4, (macro). Battery: 5000 mAh, non-removable | A power adapter is NOT included.

Choose a replacement based on the required output

A live view blur and a reusable bitmap are different results. Android’s migration guide presents RenderEffect for view effects and Vulkan and OpenGL approaches for bitmap processing. The best fit depends on the app’s minimum device coverage, graphics-pipeline needs, implementation effort, and whether anything outside the rendered view must consume the blurred pixels.

Approach Result Minimum API or device coverage Build or implementation considerations
RenderScript ScriptIntrinsicBlur Blurred bitmap after copying the output allocation to a bitmap Intrinsic added in API 17, per Android’s API reference Deprecated in API 31; AGP deprecation warnings begin with 7.2. Future AGP support is not assured by the migration guide.
RenderEffect Rendered blur effect on a view’s associated RenderNode; does not itself create a reusable bitmap Android 12, API 31 and newer Platform API with less custom graphics-pipeline work when the effect is only for an on-screen view.
Vulkan Bitmap-processing alternative demonstrated by Android’s migration guide Not stated in the cited migration guidance summarized here; verify support for the app’s target devices Requires a Vulkan graphics pipeline; assess shader work and memory transfers for the app.
OpenGL Bitmap-processing alternative demonstrated by Android’s migration guide Not stated in the cited migration guidance summarized here; verify support for the app’s target devices Requires an OpenGL graphics pipeline; assess shader work and memory transfers for the app.

For a blur that only appears on a view

On Android 12 (API 31) and newer, use RenderEffect.createBlurEffect and set it on the view. Android’s migration guide describes the effect as targeting the RenderNode associated with that view.

Rank #2
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
    view.setRenderEffect(
        RenderEffect.createBlurEffect(
            20f,
            20f,
            Shader.TileMode.MIRROR
        )
    )
}

This applies a rendering effect; it does not return blurred pixels in a new Bitmap. If the app must support versions below API 31, define and test a separate fallback for those devices rather than treating this code as a cross-version bitmap solution.

For a reusable blurred bitmap

If another part of the app needs the blurred pixels—for example, to save or process them—use a bitmap-producing pipeline. Android’s migration guide demonstrates Vulkan and OpenGL alternatives. Select between them after checking the minimum device coverage you need, the pipeline and shader complexity the team can maintain, and the cost of moving image data through the graphics path. If the app needs broad backward compatibility, specify and test a fallback separately. Do not assume a GPU-based replacement will be faster: performance depends on the devices and implementation, so measure it on the app’s target hardware.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Samsung Galaxy A16 5G 128GB Cell Phone, Unlocked Android Smartphone, Large AMOLED Display, Durable Design, Super Fast Charging, Expandable Storage, US Version, 2025, Blue Black (Renewed)
  • Charger NOT Included, 6.7" Super AMOLED FHD+, 90Hz Refresh Rate, 385 ppi, 800 nits (HBM), 1080x2340px, 5000mAh Battery
  • 128GB, 4GB RAM, microSDXC, Exynos 1330 (5nm), Octa-Core, Mali-G68 MP2 or Mali-G57 MC2 GPU
  • Rear Camera: 50MP, f/1.8 (wide) + 5MP, f/2.2 (ultrawide) + 2MP, f/2.4 (macro), LED flash, panorama, HDR; Front Camera: 13MP, f/2.0, Android 14, up to 6 major Android upgrades, One UI 6.1
  • 3G: HSDPA 850/900/1700(AWS)/1900/2100; 4G LTE: 1/2/3/4/5/7/12/13/14/20/25/26/28/29/30/38/39/40/41/48/66/71, 5G: 2/5/25/41/66/71/77/78 SA/NSA/Sub6/mmWave - Nano-SIM + eSIM
  • US Model – Global Connectivity – Compatible with Most GSM Carriers like T-Mobile, AT&T, MetroPCS, etc. Will Also work with CDMA Carriers Such as Verizon, Straight Talk.
Rank #4
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
Rank #3
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
  • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
  • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
  • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
  • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Practical migration checklist

  1. Identify the consumer. If the blur is only visual and attached to a view, use RenderEffect where API 31 or newer is available. If code needs a bitmap, select a bitmap-producing replacement.
  2. Set device coverage. Confirm the minimum Android versions and graphics capabilities required, then verify Vulkan or OpenGL support and define a fallback if needed.
  3. Account for build support. Check the project’s AGP version and build warnings. RenderScript deprecation does not itself establish that every current build has removed support, but the migration guide warns that future AGP versions will no longer include it.
  4. Validate output and performance. Compare image output and measure performance on target devices; do not rely on the legacy intrinsic’s historical execution path as proof of GPU acceleration.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.