Skip to content

Commit b7edddc

Browse files
committed
add exposure filter 🎉
1 parent 9b91c0a commit b7edddc

19 files changed

+441
-211
lines changed

‎.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ node_modules/
55

66
# Files
77
yarn-error.log
8-
.DS_Store
8+
<<<<<<< HEAD
9+
.DS_Store
10+
=======
11+
.DS_Store
12+
.idea
13+
yarn.lock
14+
package-lock.json
15+
>>>>>>> 4269836... add exposure filter 🎉

‎README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ OpenGL bindings for React Native to implement complex effects over images and co
77
- negative
88
- sepia
99
- sharpen
10-
- tempreture.
10+
- temperature
11+
- 🆕 exposure.
1112

1213
![](https://github.com/GregoryNative/react-native-gl-image-filters/blob/master/cat-gl-filters.gif)
1314

@@ -32,6 +33,7 @@ OpenGL bindings for React Native to implement complex effects over images and co
3233
| saturation | Saturation filter | Number | | 1 |
3334
| brightness | Brightness filter | Number | | 1 |
3435
| temperature | Temperature filter | Number | | 6500 |
36+
| 🆕 exposure | Exposure filter | Number | | 0 |
3537

3638
#### Recommended Min and Max range for each filter
3739

‎examples/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"react-scripts": "3.4.1"
1414
},
1515
"scripts": {
16+
"preinstall": "cd ../.. && yarn && yarn compile",
1617
"start": "react-scripts start",
1718
"build": "react-scripts build",
1819
"test": "react-scripts test",

‎examples/web/src/App.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ const settings = [
4949
minValue: 1000.0,
5050
maxValue: 40000.0,
5151
},
52+
{
53+
name: 'exposure',
54+
step: 0.05,
55+
minValue: -1.0,
56+
maxValue: 1.0,
57+
},
5258
];
5359

5460
export default class App extends Component {
@@ -66,6 +72,7 @@ export default class App extends Component {
6672
saturation: 1,
6773
brightness: 1,
6874
temperature: 6500,
75+
exposure: 0,
6976
};
7077
};
7178

@@ -108,6 +115,7 @@ export default class App extends Component {
108115
defaultValue={this.state[filter.name]}
109116
minimum={filter.minValue}
110117
maximum={filter.maxValue}
118+
step={filter.step}
111119
onChange={value => this.setState({[filter.name]: value})}
112120
/>
113121
))}

‎examples/web/src/Filter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Slider } from '@material-ui/core';
33

4-
export default ({name, defaultValue, minimum = 0, maximum, onChange}) => (
4+
export default ({name, defaultValue, minimum = 0, maximum, step = 1, onChange}) => (
55
<div className="App-filter">
66
<p className="App-filter-name">{name}</p>
77
<Slider
@@ -10,6 +10,7 @@ export default ({name, defaultValue, minimum = 0, maximum, onChange}) => (
1010
defaultValue={defaultValue}
1111
min={minimum}
1212
max={maximum}
13+
step={step}
1314
onChangeCommitted={(_, value) => onChange(value)}
1415
/>
1516
<style jsx>{`

0 commit comments

Comments
 (0)