• Home
Name Date Size #Lines LOC

..--

.google/03-May-2024-1813

Application/03-May-2024-1,451673

gradle/wrapper/03-May-2024-76

screenshots/03-May-2024-

CONTRIB.mdD03-May-20241.6 KiB3627

CONTRIBUTING.mdD03-May-20241.5 KiB3627

LICENSED03-May-202411.1 KiB202169

NOTICED03-May-2024613 1611

README.mdD03-May-20243.2 KiB7654

build.gradleD03-May-202414 150

gradlewD03-May-20245 KiB165122

gradlew.batD03-May-20242.3 KiB9166

packaging.yamlD03-May-2024500 1610

settings.gradleD03-May-202422 21

README.md

1Android BasicRenderScript Sample
2===================================
3
4This sample demonstrates using RenderScript to perform basic image manipulation. Specifically, it allows users
5to dynamically adjust the saturation for an image using a slider. A custom RenderScript kernel performs the saturation
6adjustment, running the computation on the device's GPU or other compute hardware as deemed appropriate by the system.
7
8Introduction
9------------
10
11[RenderScript][1] is a framework for running computationally intensive tasks at high performance on Android. RenderScript is
12primarily oriented for use with data-parallel computation, although serial computationally intensive workloads can
13benefit as well.
14
15The RenderScript runtime will parallelize work across all processors available on a device, such as multi-core CPUs,
16GPUs, or DSPs, allowing you to focus on expressing algorithms rather than scheduling work or load balancing.
17RenderScript is especially useful for applications performing image processing, computational photography, or computer
18vision.
19
20This sample demonstrates the fundamentals of writing a RenderScript compute kernel, and using it to perform basic image
21manipulation. In this case, each pixel is transformed based on a liner interpolation between its original
22RGB value and it's luminance (black-and-white) value, weighted based on the user's specified saturation target.
23
24[1]: http://developer.android.com/guide/topics/renderscript/compute.html
25[2]: http://developer.android.com/reference/renderscript/rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697
26
27Pre-requisites
28--------------
29
30- Android SDK v21
31- Android Build Tools v21.1.1
32- Android Support Repository
33
34Screenshots
35-------------
36
37<img src="screenshots/main.png" height="400" alt="Screenshot"/>
38
39Getting Started
40---------------
41
42This sample uses the Gradle build system. To build this project, use the
43"gradlew build" command or use "Import Project" in Android Studio.
44
45Support
46-------
47
48- Google+ Community: https://plus.google.com/communities/105153134372062985968
49- Stack Overflow: http://stackoverflow.com/questions/tagged/android
50
51If you've found an error in this sample, please file an issue:
52https://github.com/googlesamples/android-BasicRenderScript
53
54Patches are encouraged, and may be submitted by forking this project and
55submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
56
57License
58-------
59
60Copyright 2014 The Android Open Source Project, Inc.
61
62Licensed to the Apache Software Foundation (ASF) under one or more contributor
63license agreements.  See the NOTICE file distributed with this work for
64additional information regarding copyright ownership.  The ASF licenses this
65file to you under the Apache License, Version 2.0 (the "License"); you may not
66use this file except in compliance with the License.  You may obtain a copy of
67the License at
68
69http://www.apache.org/licenses/LICENSE-2.0
70
71Unless required by applicable law or agreed to in writing, software
72distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
73WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
74License for the specific language governing permissions and limitations under
75the License.
76