gre / gre/gl-react

problem with dimension!, very big size compared to the original

Open
#251 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
3k
Forks
160
PR merge metrics
No merged PRs in 30d

Description

Hello friends, I'm having problems at the moment of capturing the change made with a selected filter, the dimensions of the new image are much bigger than the original..

```
import { Surface } from 'gl-react-native';
import GLImage from 'gl-react-image'
import....
.....

//mobwidth = 411.428
//responHeigh of this file = 731.428

this.SurfaceRef = ref}
style={{ width: mobwidth, height: responHeigh }}
>



```
onPress={() => this.saveFilters()
```
saveFilters = async () => {
let fiwidth = this.props.route.params.datimag[0].width
let fiheigh = this.props.route.params.datimag[0].height

const result = await this.SurfaceRef.glView.capture();
console.log(fiwidth); // Image orig: 1080
console.log(fiheigh); // Image orig: 1920
console.log(result);

result is:
{"height": 2560,
"localUri": "file:///data/user/0/com.myapp/cache/GLView/640ad8e1-7470-465c-9e95-21b546ec512e.jpeg",
"uri": "file:///data/user/0/com.myapp/cache/GLView/640ad8e1-7470-465c-9e95-21b546ec512e.jpeg",
"width": 1440}

}
```
I don't understand why the resulting dimensions are so much larger than the original dimensions,
How can I keep the dimension of the original image?, just in case I leave the code of Valencia.js
[https://github.com/beqaweb/gl-react-native-filters/blob/master/filters/Valencia.js](url)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.